mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 15:44:12 -06:00
Bugfix: segfault in SurfaceCollection->group(), fixed with a better implementation. #1566
This commit is contained in:
parent
57fd6ad563
commit
e9b87b69df
3 changed files with 21 additions and 38 deletions
|
@ -6,26 +6,12 @@
|
|||
|
||||
namespace Slic3r {
|
||||
|
||||
struct t_surface_group_key {
|
||||
SurfaceType surface_type;
|
||||
double thickness;
|
||||
unsigned short thickness_layers;
|
||||
double bridge_angle;
|
||||
|
||||
bool operator< (const t_surface_group_key &key) const {
|
||||
return (this->surface_type < key.surface_type)
|
||||
|| (this->thickness < key.thickness)
|
||||
|| (this->thickness_layers < key.thickness_layers)
|
||||
|| (this->bridge_angle < key.bridge_angle);
|
||||
}
|
||||
};
|
||||
|
||||
class SurfaceCollection
|
||||
{
|
||||
public:
|
||||
Surfaces surfaces;
|
||||
void simplify(double tolerance);
|
||||
void group(std::vector<SurfacesPtr> &retval, bool merge_solid = false);
|
||||
void group(std::vector<SurfacesPtr> *retval, bool merge_solid = false);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue