diff options
Diffstat (limited to 'xs/src/libslic3r/LayerRegion.cpp')
-rw-r--r-- | xs/src/libslic3r/LayerRegion.cpp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/xs/src/libslic3r/LayerRegion.cpp b/xs/src/libslic3r/LayerRegion.cpp new file mode 100644 index 000000000..cb92c4ee3 --- /dev/null +++ b/xs/src/libslic3r/LayerRegion.cpp @@ -0,0 +1,45 @@ +#include "Layer.hpp" +#include "Print.hpp" + +namespace Slic3r { + +LayerRegion::LayerRegion(Layer *layer, PrintRegion *region) +: _layer(layer), + _region(region) +{ +} + +LayerRegion::~LayerRegion() +{ +} + +Layer* +LayerRegion::layer() +{ + return this->_layer; +} + +PrintRegion* +LayerRegion::region() +{ + return this->_region; +} + +Flow +LayerRegion::flow(FlowRole role, bool bridge, double width) const +{ + return this->_region->flow( + role, + this->_layer->height, + bridge, + this->_layer->id() == 0, + width, + *this->_layer->object() + ); +} + +#ifdef SLIC3RXS +REGISTER_CLASS(LayerRegion, "Layer::Region"); +#endif + +} |