mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 18:27:58 -06:00
Initial work for 3D rendering of toolpaths
This commit is contained in:
parent
18e815d032
commit
e0a3d2577c
12 changed files with 166 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue