mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-23 00:31:11 -06:00
Defined the +-* operators on Pointf.
Removed the deprecated VibrationLimit feature. Added triangle infill. The Prusa3D fork of Slic3r has been marked as "Slic3r Prusa Edition" with menus pointing to the prusa3d/slic3r github release page and Prusa3D drivers downloads page.
This commit is contained in:
parent
15d3e94a66
commit
1fb57e439e
25 changed files with 148 additions and 237 deletions
|
@ -24,6 +24,7 @@ Fill* Fill::new_from_type(const InfillPattern type)
|
|||
// case ipRectilinear: return new FillRectilinear();
|
||||
case ipLine: return new FillLine();
|
||||
case ipGrid: return new FillGrid2();
|
||||
case ipTriangles: return new FillTriangles();
|
||||
// case ipGrid: return new FillGrid();
|
||||
case ipArchimedeanChords: return new FillArchimedeanChords();
|
||||
case ipHilbertCurve: return new FillHilbertCurve();
|
||||
|
|
|
@ -1449,10 +1449,20 @@ Polylines FillGrid2::fill_surface(const Surface *surface, const FillParams ¶
|
|||
Polylines polylines_out;
|
||||
if (! fill_surface_by_lines(surface, params, 0.f, polylines_out) ||
|
||||
! fill_surface_by_lines(surface, params, float(M_PI / 2.), polylines_out)) {
|
||||
printf("FillRectilinear2::fill_surface() failed to fill a region.\n");
|
||||
printf("FillGrid2::fill_surface() failed to fill a region.\n");
|
||||
}
|
||||
return polylines_out;
|
||||
}
|
||||
|
||||
Polylines FillTriangles::fill_surface(const Surface *surface, const FillParams ¶ms)
|
||||
{
|
||||
Polylines polylines_out;
|
||||
if (! fill_surface_by_lines(surface, params, 0.f, polylines_out) ||
|
||||
! fill_surface_by_lines(surface, params, float(M_PI / 3.), polylines_out) ||
|
||||
! fill_surface_by_lines(surface, params, float(2. * M_PI / 3.), polylines_out)) {
|
||||
printf("FillTriangles::fill_surface() failed to fill a region.\n");
|
||||
}
|
||||
return polylines_out;
|
||||
}
|
||||
|
||||
} // namespace Slic3r
|
||||
|
|
@ -35,6 +35,17 @@ protected:
|
|||
virtual float _layer_angle(size_t idx) const { return 0.f; }
|
||||
};
|
||||
|
||||
class FillTriangles : public FillRectilinear2
|
||||
{
|
||||
public:
|
||||
virtual ~FillTriangles() {}
|
||||
virtual Polylines fill_surface(const Surface *surface, const FillParams ¶ms);
|
||||
|
||||
protected:
|
||||
// The grid fill will keep the angle constant between the layers, see the implementation of Slic3r::Fill::Base.
|
||||
virtual float _layer_angle(size_t idx) const { return 0.f; }
|
||||
};
|
||||
|
||||
}; // namespace Slic3r
|
||||
|
||||
#endif // slic3r_FillRectilinear2_hpp_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue