mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-19 20:57:53 -06:00
Ported PrintObject::bridge_over_infill() to XS
This commit is contained in:
parent
ea40c4d1b0
commit
4848cb7606
8 changed files with 130 additions and 76 deletions
|
@ -80,6 +80,27 @@ SurfaceCollection::any_internal_contains(const T &item) const
|
|||
template bool SurfaceCollection::any_internal_contains<Line>(const Line &item) const;
|
||||
template bool SurfaceCollection::any_internal_contains<Polyline>(const Polyline &item) const;
|
||||
|
||||
SurfacesPtr
|
||||
SurfaceCollection::filter_by_type(SurfaceType type)
|
||||
{
|
||||
SurfacesPtr ss;
|
||||
for (Surfaces::iterator surface = this->surfaces.begin(); surface != this->surfaces.end(); ++surface) {
|
||||
if (surface->surface_type == type) ss.push_back(&*surface);
|
||||
}
|
||||
return ss;
|
||||
}
|
||||
|
||||
void
|
||||
SurfaceCollection::filter_by_type(SurfaceType type, Polygons* polygons)
|
||||
{
|
||||
for (Surfaces::iterator surface = this->surfaces.begin(); surface != this->surfaces.end(); ++surface) {
|
||||
if (surface->surface_type == type) {
|
||||
Polygons pp = surface->expolygon;
|
||||
polygons->insert(polygons->end(), pp.begin(), pp.end());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SLIC3RXS
|
||||
REGISTER_CLASS(SurfaceCollection, "Surface::Collection");
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue