mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 03:07:55 -06:00
Ported LayerRegion::make_slices() to XS
This commit is contained in:
parent
948793e570
commit
b69caff93c
11 changed files with 78 additions and 77 deletions
|
@ -1,5 +1,7 @@
|
|||
#include "Layer.hpp"
|
||||
#include "ClipperUtils.hpp"
|
||||
#include "Print.hpp"
|
||||
#include "Surface.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
|
@ -38,6 +40,18 @@ LayerRegion::flow(FlowRole role, bool bridge, double width) const
|
|||
);
|
||||
}
|
||||
|
||||
void
|
||||
LayerRegion::merge_slices()
|
||||
{
|
||||
ExPolygons expp;
|
||||
union_(this->slices, expp);
|
||||
this->slices.surfaces.clear();
|
||||
this->slices.surfaces.reserve(expp.size());
|
||||
|
||||
for (ExPolygons::const_iterator expoly = expp.begin(); expoly != expp.end(); ++expoly)
|
||||
this->slices.surfaces.push_back(Surface(stInternal, *expoly));
|
||||
}
|
||||
|
||||
#ifdef SLIC3RXS
|
||||
REGISTER_CLASS(LayerRegion, "Layer::Region");
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue