WIP: Layers split into islands, islands overlapping in Z interconnected

into a graph with links to the layer above / below.

In addition:
Members of LayerRegion were made private, public interface const only.
this->m_xxx replaced with just m_xxx
SurfacesPtr was made a vector of const pointers.
This commit is contained in:
Vojtech Bubnik 2022-10-26 18:41:39 +02:00
parent f57744ad12
commit ee626eb65a
39 changed files with 751 additions and 356 deletions

View file

@ -104,7 +104,7 @@ public:
};
typedef std::vector<Surface> Surfaces;
typedef std::vector<Surface*> SurfacesPtr;
typedef std::vector<const Surface*> SurfacesPtr;
inline Polygons to_polygons(const Surface &surface)
{
@ -221,6 +221,7 @@ inline void polygons_append(Polygons &dst, const SurfacesPtr &src)
}
}
/*
inline void polygons_append(Polygons &dst, SurfacesPtr &&src)
{
dst.reserve(dst.size() + number_polygons(src));
@ -230,6 +231,7 @@ inline void polygons_append(Polygons &dst, SurfacesPtr &&src)
(*it)->expolygon.holes.clear();
}
}
*/
// Append a vector of Surfaces at the end of another vector of polygons.
inline void surfaces_append(Surfaces &dst, const ExPolygons &src, SurfaceType surfaceType)