2013-12-20 00:36:42 +00:00
|
|
|
#include "Print.hpp"
|
2014-05-06 08:07:18 +00:00
|
|
|
#include "BoundingBox.hpp"
|
2013-12-20 00:36:42 +00:00
|
|
|
|
|
|
|
namespace Slic3r {
|
|
|
|
|
2014-06-10 22:15:02 +00:00
|
|
|
template <class StepClass>
|
2013-12-20 00:36:42 +00:00
|
|
|
bool
|
2014-06-13 09:19:53 +00:00
|
|
|
PrintState<StepClass>::is_started(StepClass step) const
|
2013-12-20 00:36:42 +00:00
|
|
|
{
|
2014-06-13 09:19:53 +00:00
|
|
|
return this->started.find(step) != this->started.end();
|
2013-12-20 00:36:42 +00:00
|
|
|
}
|
|
|
|
|
2014-06-10 22:15:02 +00:00
|
|
|
template <class StepClass>
|
2013-12-20 00:36:42 +00:00
|
|
|
bool
|
2014-06-13 09:19:53 +00:00
|
|
|
PrintState<StepClass>::is_done(StepClass step) const
|
2013-12-20 00:36:42 +00:00
|
|
|
{
|
2014-06-13 09:19:53 +00:00
|
|
|
return this->done.find(step) != this->done.end();
|
2013-12-20 00:36:42 +00:00
|
|
|
}
|
|
|
|
|
2014-06-10 22:15:02 +00:00
|
|
|
template <class StepClass>
|
2013-12-20 00:36:42 +00:00
|
|
|
void
|
2014-06-10 22:15:02 +00:00
|
|
|
PrintState<StepClass>::set_started(StepClass step)
|
2013-12-20 00:36:42 +00:00
|
|
|
{
|
2014-06-13 09:19:53 +00:00
|
|
|
this->started.insert(step);
|
2013-12-20 00:36:42 +00:00
|
|
|
}
|
|
|
|
|
2014-06-10 22:15:02 +00:00
|
|
|
template <class StepClass>
|
2013-12-20 00:36:42 +00:00
|
|
|
void
|
2014-06-10 22:15:02 +00:00
|
|
|
PrintState<StepClass>::set_done(StepClass step)
|
2013-12-20 00:36:42 +00:00
|
|
|
{
|
2014-06-13 09:19:53 +00:00
|
|
|
this->done.insert(step);
|
2013-12-20 00:36:42 +00:00
|
|
|
}
|
|
|
|
|
2014-06-10 22:15:02 +00:00
|
|
|
template <class StepClass>
|
2014-06-12 07:29:26 +00:00
|
|
|
bool
|
2014-06-13 09:19:53 +00:00
|
|
|
PrintState<StepClass>::invalidate(StepClass step)
|
2014-01-02 21:06:58 +00:00
|
|
|
{
|
2014-06-13 09:19:53 +00:00
|
|
|
bool invalidated = this->started.erase(step) > 0;
|
|
|
|
this->done.erase(step);
|
|
|
|
return invalidated;
|
2014-01-02 21:06:58 +00:00
|
|
|
}
|
|
|
|
|
2014-06-10 22:15:02 +00:00
|
|
|
template class PrintState<PrintStep>;
|
|
|
|
template class PrintState<PrintObjectStep>;
|
2014-05-06 08:07:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
PrintRegion::PrintRegion(Print* print)
|
2014-06-10 22:15:02 +00:00
|
|
|
: _print(print)
|
2014-05-06 08:07:18 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
PrintRegion::~PrintRegion()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-05-19 20:38:10 +00:00
|
|
|
Print*
|
|
|
|
PrintRegion::print()
|
|
|
|
{
|
|
|
|
return this->_print;
|
|
|
|
}
|
|
|
|
|
2014-05-06 08:07:18 +00:00
|
|
|
#ifdef SLIC3RXS
|
|
|
|
REGISTER_CLASS(PrintRegion, "Print::Region");
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2014-06-10 22:15:02 +00:00
|
|
|
PrintObject::PrintObject(Print* print, ModelObject* model_object, const BoundingBoxf3 &modobj_bbox)
|
2014-05-19 20:38:10 +00:00
|
|
|
: _print(print),
|
|
|
|
_model_object(model_object)
|
2014-05-06 08:07:18 +00:00
|
|
|
{
|
2014-05-19 20:38:10 +00:00
|
|
|
region_volumes.resize(this->_print->regions.size());
|
2014-05-06 08:07:18 +00:00
|
|
|
|
|
|
|
// Compute the translation to be applied to our meshes so that we work with smaller coordinates
|
|
|
|
{
|
|
|
|
// Translate meshes so that our toolpath generation algorithms work with smaller
|
|
|
|
// XY coordinates; this translation is an optimization and not strictly required.
|
|
|
|
// A cloned mesh will be aligned to 0 before slicing in _slice_region() since we
|
|
|
|
// don't assume it's already aligned and we don't alter the original position in model.
|
|
|
|
// We store the XY translation so that we can place copies correctly in the output G-code
|
|
|
|
// (copies are expressed in G-code coordinates and this translation is not publicly exposed).
|
2014-05-19 19:54:32 +00:00
|
|
|
this->_copies_shift = Point(
|
|
|
|
scale_(modobj_bbox.min.x), scale_(modobj_bbox.min.y));
|
2014-05-06 08:07:18 +00:00
|
|
|
|
|
|
|
// TODO: $self->_trigger_copies;
|
|
|
|
|
|
|
|
// Scale the object size and store it
|
|
|
|
Pointf3 size = modobj_bbox.size();
|
|
|
|
this->size = Point3(scale_(size.x), scale_(size.y), scale_(size.z));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
PrintObject::~PrintObject()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-05-19 20:38:10 +00:00
|
|
|
Print*
|
|
|
|
PrintObject::print()
|
|
|
|
{
|
|
|
|
return this->_print;
|
|
|
|
}
|
|
|
|
|
|
|
|
ModelObject*
|
|
|
|
PrintObject::model_object()
|
|
|
|
{
|
|
|
|
return this->_model_object;
|
|
|
|
}
|
|
|
|
|
2014-05-06 08:07:18 +00:00
|
|
|
void
|
|
|
|
PrintObject::add_region_volume(int region_id, int volume_id)
|
|
|
|
{
|
|
|
|
if (region_id >= region_volumes.size()) {
|
|
|
|
region_volumes.resize(region_id + 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
region_volumes[region_id].push_back(volume_id);
|
|
|
|
}
|
|
|
|
|
|
|
|
size_t
|
|
|
|
PrintObject::layer_count()
|
|
|
|
{
|
|
|
|
return this->layers.size();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
PrintObject::clear_layers()
|
|
|
|
{
|
|
|
|
for (int i = this->layers.size()-1; i >= 0; --i)
|
|
|
|
this->delete_layer(i);
|
|
|
|
}
|
|
|
|
|
|
|
|
Layer*
|
|
|
|
PrintObject::get_layer(int idx)
|
|
|
|
{
|
|
|
|
return this->layers.at(idx);
|
|
|
|
}
|
|
|
|
|
|
|
|
Layer*
|
2014-06-10 22:15:02 +00:00
|
|
|
PrintObject::add_layer(int id, coordf_t height, coordf_t print_z, coordf_t slice_z)
|
2014-05-06 08:07:18 +00:00
|
|
|
{
|
|
|
|
Layer* layer = new Layer(id, this, height, print_z, slice_z);
|
|
|
|
layers.push_back(layer);
|
|
|
|
return layer;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
PrintObject::delete_layer(int idx)
|
|
|
|
{
|
|
|
|
LayerPtrs::iterator i = this->layers.begin() + idx;
|
2014-06-10 14:01:57 +00:00
|
|
|
delete *i;
|
2014-05-06 08:07:18 +00:00
|
|
|
this->layers.erase(i);
|
|
|
|
}
|
|
|
|
|
|
|
|
size_t
|
|
|
|
PrintObject::support_layer_count()
|
|
|
|
{
|
|
|
|
return this->support_layers.size();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
PrintObject::clear_support_layers()
|
|
|
|
{
|
|
|
|
for (int i = this->support_layers.size()-1; i >= 0; --i)
|
|
|
|
this->delete_support_layer(i);
|
|
|
|
}
|
|
|
|
|
|
|
|
SupportLayer*
|
|
|
|
PrintObject::get_support_layer(int idx)
|
|
|
|
{
|
|
|
|
return this->support_layers.at(idx);
|
|
|
|
}
|
|
|
|
|
|
|
|
SupportLayer*
|
|
|
|
PrintObject::add_support_layer(int id, coordf_t height, coordf_t print_z,
|
|
|
|
coordf_t slice_z)
|
|
|
|
{
|
|
|
|
SupportLayer* layer = new SupportLayer(id, this, height, print_z, slice_z);
|
|
|
|
support_layers.push_back(layer);
|
|
|
|
return layer;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
PrintObject::delete_support_layer(int idx)
|
|
|
|
{
|
|
|
|
SupportLayerPtrs::iterator i = this->support_layers.begin() + idx;
|
2014-06-10 14:01:57 +00:00
|
|
|
delete *i;
|
2014-05-06 08:07:18 +00:00
|
|
|
this->support_layers.erase(i);
|
|
|
|
}
|
|
|
|
|
2014-06-10 22:15:02 +00:00
|
|
|
bool
|
|
|
|
PrintObject::invalidate_state_by_config_options(const std::vector<t_config_option_key> &opt_keys)
|
|
|
|
{
|
|
|
|
std::set<PrintObjectStep> steps;
|
|
|
|
|
2014-06-11 15:51:18 +00:00
|
|
|
// this method only accepts PrintObjectConfig and PrintRegionConfig option keys
|
2014-06-10 22:15:02 +00:00
|
|
|
for (std::vector<t_config_option_key>::const_iterator opt_key = opt_keys.begin(); opt_key != opt_keys.end(); ++opt_key) {
|
2014-06-11 15:51:18 +00:00
|
|
|
if (*opt_key == "perimeters"
|
|
|
|
|| *opt_key == "extra_perimeters"
|
|
|
|
|| *opt_key == "gap_fill_speed"
|
|
|
|
|| *opt_key == "overhangs"
|
|
|
|
|| *opt_key == "perimeter_extrusion_width"
|
2014-06-11 20:15:28 +00:00
|
|
|
|| *opt_key == "thin_walls"
|
|
|
|
|| *opt_key == "external_perimeters_first") {
|
2014-06-10 22:15:02 +00:00
|
|
|
steps.insert(posPerimeters);
|
|
|
|
} else if (*opt_key == "resolution"
|
|
|
|
|| *opt_key == "layer_height"
|
|
|
|
|| *opt_key == "first_layer_height"
|
|
|
|
|| *opt_key == "xy_size_compensation"
|
|
|
|
|| *opt_key == "raft_layers") {
|
|
|
|
steps.insert(posSlice);
|
|
|
|
} else if (*opt_key == "support_material"
|
|
|
|
|| *opt_key == "support_material_angle"
|
2014-06-11 15:51:18 +00:00
|
|
|
|| *opt_key == "support_material_extruder"
|
2014-06-10 22:15:02 +00:00
|
|
|
|| *opt_key == "support_material_extrusion_width"
|
|
|
|
|| *opt_key == "support_material_interface_layers"
|
2014-06-11 15:51:18 +00:00
|
|
|
|| *opt_key == "support_material_interface_extruder"
|
2014-06-10 22:15:02 +00:00
|
|
|
|| *opt_key == "support_material_interface_spacing"
|
|
|
|
|| *opt_key == "support_material_interface_speed"
|
|
|
|
|| *opt_key == "support_material_pattern"
|
|
|
|
|| *opt_key == "support_material_spacing"
|
|
|
|
|| *opt_key == "support_material_threshold"
|
|
|
|
|| *opt_key == "dont_support_bridges") {
|
|
|
|
steps.insert(posSupportMaterial);
|
|
|
|
} else if (*opt_key == "interface_shells"
|
2014-06-11 15:51:18 +00:00
|
|
|
|| *opt_key == "infill_only_where_needed"
|
|
|
|
|| *opt_key == "bottom_solid_layers"
|
|
|
|
|| *opt_key == "top_solid_layers"
|
|
|
|
|| *opt_key == "infill_extruder"
|
|
|
|
|| *opt_key == "infill_extrusion_width") {
|
2014-06-10 22:15:02 +00:00
|
|
|
steps.insert(posPrepareInfill);
|
2014-06-11 15:51:18 +00:00
|
|
|
} else if (*opt_key == "fill_angle"
|
|
|
|
|| *opt_key == "fill_pattern"
|
|
|
|
|| *opt_key == "solid_fill_pattern"
|
|
|
|
|| *opt_key == "infill_every_layers"
|
|
|
|
|| *opt_key == "solid_infill_below_area"
|
|
|
|
|| *opt_key == "solid_infill_every_layers"
|
|
|
|
|| *opt_key == "top_infill_extrusion_width") {
|
|
|
|
steps.insert(posInfill);
|
|
|
|
} else if (*opt_key == "fill_density"
|
|
|
|
|| *opt_key == "solid_infill_extrusion_width") {
|
|
|
|
steps.insert(posPerimeters);
|
|
|
|
steps.insert(posPrepareInfill);
|
|
|
|
} else if (*opt_key == "external_perimeter_extrusion_width"
|
|
|
|
|| *opt_key == "perimeter_extruder") {
|
|
|
|
steps.insert(posPerimeters);
|
|
|
|
steps.insert(posSupportMaterial);
|
2014-06-11 20:10:33 +00:00
|
|
|
} else if (*opt_key == "bridge_flow_ratio") {
|
|
|
|
steps.insert(posPerimeters);
|
|
|
|
steps.insert(posInfill);
|
2014-06-10 22:15:02 +00:00
|
|
|
} else {
|
2014-06-13 09:19:53 +00:00
|
|
|
// for legacy, if we can't handle this option let's invalidate all steps
|
|
|
|
return this->invalidate_all_steps();
|
2014-06-10 22:15:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-06-13 09:19:53 +00:00
|
|
|
bool invalidated = false;
|
|
|
|
for (std::set<PrintObjectStep>::const_iterator step = steps.begin(); step != steps.end(); ++step) {
|
|
|
|
if (this->invalidate_step(*step)) invalidated = true;
|
|
|
|
}
|
2014-06-10 22:15:02 +00:00
|
|
|
|
2014-06-13 09:19:53 +00:00
|
|
|
return invalidated;
|
2014-06-10 22:15:02 +00:00
|
|
|
}
|
|
|
|
|
2014-06-13 09:19:53 +00:00
|
|
|
bool
|
2014-06-10 22:15:02 +00:00
|
|
|
PrintObject::invalidate_step(PrintObjectStep step)
|
|
|
|
{
|
2014-06-13 09:19:53 +00:00
|
|
|
bool invalidated = this->state.invalidate(step);
|
2014-06-10 22:15:02 +00:00
|
|
|
|
|
|
|
// propagate to dependent steps
|
|
|
|
if (step == posPerimeters) {
|
|
|
|
this->invalidate_step(posPrepareInfill);
|
|
|
|
this->_print->invalidate_step(psSkirt);
|
|
|
|
this->_print->invalidate_step(psBrim);
|
|
|
|
} else if (step == posPrepareInfill) {
|
|
|
|
this->invalidate_step(posInfill);
|
|
|
|
} else if (step == posInfill) {
|
|
|
|
this->_print->invalidate_step(psSkirt);
|
|
|
|
this->_print->invalidate_step(psBrim);
|
|
|
|
} else if (step == posSlice) {
|
|
|
|
this->invalidate_step(posPerimeters);
|
|
|
|
this->invalidate_step(posSupportMaterial);
|
|
|
|
}
|
2014-06-13 09:19:53 +00:00
|
|
|
|
|
|
|
return invalidated;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
PrintObject::invalidate_all_steps()
|
|
|
|
{
|
|
|
|
// make a copy because when invalidating steps the iterators are not working anymore
|
|
|
|
std::set<PrintObjectStep> steps = this->state.started;
|
|
|
|
|
|
|
|
bool invalidated = false;
|
|
|
|
for (std::set<PrintObjectStep>::const_iterator step = steps.begin(); step != steps.end(); ++step) {
|
|
|
|
if (this->invalidate_step(*step)) invalidated = true;
|
|
|
|
}
|
|
|
|
return invalidated;
|
2014-06-10 22:15:02 +00:00
|
|
|
}
|
|
|
|
|
2014-05-06 08:07:18 +00:00
|
|
|
|
|
|
|
#ifdef SLIC3RXS
|
|
|
|
REGISTER_CLASS(PrintObject, "Print::Object");
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
Print::Print()
|
|
|
|
: total_used_filament(0),
|
|
|
|
total_extruded_volume(0)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
Print::~Print()
|
|
|
|
{
|
|
|
|
clear_objects();
|
|
|
|
clear_regions();
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
Print::clear_objects()
|
|
|
|
{
|
|
|
|
for (int i = this->objects.size()-1; i >= 0; --i)
|
|
|
|
this->delete_object(i);
|
|
|
|
|
|
|
|
this->clear_regions();
|
|
|
|
|
2014-06-10 22:15:02 +00:00
|
|
|
this->state.invalidate(psSkirt);
|
|
|
|
this->state.invalidate(psBrim);
|
2014-05-06 08:07:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
PrintObject*
|
2014-06-10 14:01:57 +00:00
|
|
|
Print::get_object(size_t idx)
|
2014-05-06 08:07:18 +00:00
|
|
|
{
|
|
|
|
return objects.at(idx);
|
|
|
|
}
|
|
|
|
|
|
|
|
PrintObject*
|
|
|
|
Print::add_object(ModelObject *model_object,
|
|
|
|
const BoundingBoxf3 &modobj_bbox)
|
|
|
|
{
|
2014-06-10 14:01:57 +00:00
|
|
|
PrintObject *object = new PrintObject(this, model_object, modobj_bbox);
|
2014-05-06 08:07:18 +00:00
|
|
|
objects.push_back(object);
|
|
|
|
return object;
|
|
|
|
}
|
|
|
|
|
|
|
|
PrintObject*
|
2014-06-10 14:01:57 +00:00
|
|
|
Print::set_new_object(size_t idx, ModelObject *model_object, const BoundingBoxf3 &modobj_bbox)
|
2014-05-06 08:07:18 +00:00
|
|
|
{
|
2014-06-10 22:15:02 +00:00
|
|
|
if (idx >= this->objects.size()) throw "bad idx";
|
2014-05-06 08:07:18 +00:00
|
|
|
|
|
|
|
PrintObjectPtrs::iterator old_it = this->objects.begin() + idx;
|
|
|
|
delete *old_it;
|
|
|
|
|
2014-06-10 14:01:57 +00:00
|
|
|
PrintObject *object = new PrintObject(this, model_object, modobj_bbox);
|
2014-05-06 08:07:18 +00:00
|
|
|
this->objects[idx] = object;
|
|
|
|
return object;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2014-06-10 14:01:57 +00:00
|
|
|
Print::delete_object(size_t idx)
|
2014-05-06 08:07:18 +00:00
|
|
|
{
|
|
|
|
PrintObjectPtrs::iterator i = this->objects.begin() + idx;
|
2014-06-10 14:01:57 +00:00
|
|
|
delete *i;
|
2014-05-06 08:07:18 +00:00
|
|
|
this->objects.erase(i);
|
|
|
|
|
|
|
|
// TODO: purge unused regions
|
|
|
|
|
2014-06-10 22:15:02 +00:00
|
|
|
this->state.invalidate(psSkirt);
|
|
|
|
this->state.invalidate(psBrim);
|
2014-05-06 08:07:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
Print::clear_regions()
|
|
|
|
{
|
|
|
|
for (int i = this->regions.size()-1; i >= 0; --i)
|
|
|
|
this->delete_region(i);
|
|
|
|
}
|
|
|
|
|
|
|
|
PrintRegion*
|
2014-06-10 14:01:57 +00:00
|
|
|
Print::get_region(size_t idx)
|
2014-05-06 08:07:18 +00:00
|
|
|
{
|
|
|
|
return regions.at(idx);
|
|
|
|
}
|
|
|
|
|
|
|
|
PrintRegion*
|
|
|
|
Print::add_region()
|
|
|
|
{
|
|
|
|
PrintRegion *region = new PrintRegion(this);
|
|
|
|
regions.push_back(region);
|
|
|
|
return region;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2014-06-10 14:01:57 +00:00
|
|
|
Print::delete_region(size_t idx)
|
2014-05-06 08:07:18 +00:00
|
|
|
{
|
|
|
|
PrintRegionPtrs::iterator i = this->regions.begin() + idx;
|
2014-06-10 14:01:57 +00:00
|
|
|
delete *i;
|
2014-05-06 08:07:18 +00:00
|
|
|
this->regions.erase(i);
|
|
|
|
}
|
|
|
|
|
2014-06-10 22:15:02 +00:00
|
|
|
bool
|
|
|
|
Print::invalidate_state_by_config_options(const std::vector<t_config_option_key> &opt_keys)
|
|
|
|
{
|
|
|
|
std::set<PrintStep> steps;
|
|
|
|
|
|
|
|
// this method only accepts PrintConfig option keys
|
|
|
|
for (std::vector<t_config_option_key>::const_iterator opt_key = opt_keys.begin(); opt_key != opt_keys.end(); ++opt_key) {
|
|
|
|
if (*opt_key == "skirts"
|
|
|
|
|| *opt_key == "skirt_height"
|
|
|
|
|| *opt_key == "skirt_distance"
|
|
|
|
|| *opt_key == "min_skirt_length") {
|
|
|
|
steps.insert(psSkirt);
|
|
|
|
} else if (*opt_key == "brim_width") {
|
|
|
|
steps.insert(psBrim);
|
|
|
|
} else {
|
2014-06-13 09:19:53 +00:00
|
|
|
// for legacy, if we can't handle this option let's invalidate all steps
|
|
|
|
return this->invalidate_all_steps();
|
2014-06-10 22:15:02 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-06-13 09:19:53 +00:00
|
|
|
bool invalidated = false;
|
|
|
|
for (std::set<PrintStep>::const_iterator step = steps.begin(); step != steps.end(); ++step) {
|
|
|
|
if (this->invalidate_step(*step)) invalidated = true;
|
|
|
|
}
|
2014-06-10 22:15:02 +00:00
|
|
|
|
2014-06-13 09:19:53 +00:00
|
|
|
return invalidated;
|
2014-06-10 22:15:02 +00:00
|
|
|
}
|
|
|
|
|
2014-06-13 09:19:53 +00:00
|
|
|
bool
|
2014-06-10 22:15:02 +00:00
|
|
|
Print::invalidate_step(PrintStep step)
|
|
|
|
{
|
2014-06-13 09:19:53 +00:00
|
|
|
bool invalidated = this->state.invalidate(step);
|
2014-06-10 22:15:02 +00:00
|
|
|
|
|
|
|
// propagate to dependent steps
|
|
|
|
if (step == psSkirt) {
|
|
|
|
this->invalidate_step(psBrim);
|
|
|
|
} else if (step == psInitExtruders) {
|
|
|
|
for (PrintObjectPtrs::iterator object = this->objects.begin(); object != this->objects.end(); ++object) {
|
|
|
|
(*object)->invalidate_step(posPerimeters);
|
|
|
|
(*object)->invalidate_step(posSupportMaterial);
|
|
|
|
}
|
|
|
|
}
|
2014-06-13 09:19:53 +00:00
|
|
|
|
|
|
|
return invalidated;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
Print::invalidate_all_steps()
|
|
|
|
{
|
|
|
|
// make a copy because when invalidating steps the iterators are not working anymore
|
|
|
|
std::set<PrintStep> steps = this->state.started;
|
|
|
|
|
|
|
|
bool invalidated = false;
|
|
|
|
for (std::set<PrintStep>::const_iterator step = steps.begin(); step != steps.end(); ++step) {
|
|
|
|
if (this->invalidate_step(*step)) invalidated = true;
|
|
|
|
}
|
|
|
|
return invalidated;
|
2014-06-10 22:15:02 +00:00
|
|
|
}
|
|
|
|
|
2014-05-06 08:07:18 +00:00
|
|
|
|
|
|
|
#ifdef SLIC3RXS
|
|
|
|
REGISTER_CLASS(Print, "Print");
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2013-12-20 00:36:42 +00:00
|
|
|
}
|