mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-25 01:49:22 -07:00
Initial work for 3D rendering of toolpaths
This commit is contained in:
@@ -164,6 +164,14 @@ ExtrusionPath::gcode(Extruder* extruder, double e, double F,
|
||||
return stream.str();
|
||||
}
|
||||
|
||||
Polygons
|
||||
ExtrusionPath::grow() const
|
||||
{
|
||||
Polygons pp;
|
||||
offset(this->polyline, &pp, +this->width/2);
|
||||
return pp;
|
||||
}
|
||||
|
||||
ExtrusionLoop::operator Polygon() const
|
||||
{
|
||||
Polygon polygon;
|
||||
@@ -363,6 +371,17 @@ ExtrusionLoop::is_solid_infill() const
|
||||
|| this->paths.front().role == erTopSolidInfill;
|
||||
}
|
||||
|
||||
Polygons
|
||||
ExtrusionLoop::grow() const
|
||||
{
|
||||
Polygons pp;
|
||||
for (ExtrusionPaths::const_iterator path = this->paths.begin(); path != this->paths.end(); ++path) {
|
||||
Polygons path_pp = path->grow();
|
||||
pp.insert(pp.end(), path_pp.begin(), path_pp.end());
|
||||
}
|
||||
return pp;
|
||||
}
|
||||
|
||||
#ifdef SLIC3RXS
|
||||
REGISTER_CLASS(ExtrusionLoop, "ExtrusionLoop");
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user