mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-27 04:42:33 +00:00
Add Point3 return type getters for first and last point to ExtrusionEntity (#13855)
Fix compile error in Debug mode. Adds getters for Point3 types in ExtrusionEntity ZAA changed ExtrusionPath::polyline from Polyline to Polyline3, preserving the existing interfaces by converting first_point and last_point to return a Point copy constructed from the underlying Point3 type. ExtrusionLoop::validate function was not updated and is broken in debug configurations as it's currently comparing Point to Point3 This change promotes ExtrusionPath::first_point3/last_point3 to the ExtrusionEntity base class as a pure virtual function, implements them on derived classes, and fixes ExtrusionLoop::validate
This commit is contained in:
@@ -119,7 +119,10 @@ public:
|
||||
{ return this->no_sort ? *this : chained_path_from(this->entities, start_near, role); }
|
||||
void reverse() override;
|
||||
Point first_point() const override { return this->entities.front()->first_point(); }
|
||||
const Point3& first_point3() const override { return this->entities.front()->first_point3(); }
|
||||
Point last_point() const override { return this->entities.back()->last_point(); }
|
||||
const Point3& last_point3() const override { return this->entities.back()->last_point3(); }
|
||||
|
||||
// Produce a list of 2D polygons covered by the extruded paths, offsetted by the extrusion width.
|
||||
// Increase the offset by scaled_epsilon to achieve an overlap, so a union will produce no gaps.
|
||||
void polygons_covered_by_width(Polygons &out, const float scaled_epsilon) const override;
|
||||
|
||||
Reference in New Issue
Block a user