Maximize gyroid printing speed angle

Counter-rotate the default angle by 45' so that gyroid is kept at it's
maximum printing speed by default.
This commit is contained in:
Yuri D'Elia 2019-08-07 21:45:23 +02:00
parent f8490fb4e0
commit da6c285f1f
2 changed files with 13 additions and 4 deletions

View file

@ -152,7 +152,9 @@ void FillGyroid::_fill_surface_single(
ExPolygon &expolygon, ExPolygon &expolygon,
Polylines &polylines_out) Polylines &polylines_out)
{ {
expolygon.rotate(-this->angle); float infill_angle = this->angle + (CorrectionAngle * 2*M_PI) / 360.;
if(abs(infill_angle) >= EPSILON)
expolygon.rotate(-infill_angle);
BoundingBox bb = expolygon.contour.bounding_box(); BoundingBox bb = expolygon.contour.bounding_box();
// Density adjusted to have a good %of weight. // Density adjusted to have a good %of weight.
@ -228,9 +230,11 @@ void FillGyroid::_fill_surface_single(
} }
// new paths must be rotated back // new paths must be rotated back
if(abs(infill_angle) >= EPSILON) {
for (Polylines::iterator it = polylines_out.begin() + polylines_out_first_idx; for (Polylines::iterator it = polylines_out.begin() + polylines_out_first_idx;
it != polylines_out.end(); ++it) { it != polylines_out.end(); ++it) {
it->rotate(this->angle); it->rotate(infill_angle);
}
} }
} }

View file

@ -16,6 +16,11 @@ public:
// require bridge flow since most of this pattern hangs in air // require bridge flow since most of this pattern hangs in air
virtual bool use_bridge_flow() const { return false; } virtual bool use_bridge_flow() const { return false; }
// Correction applied to regular infill angle to maximize printing
// speed in default configuration (degrees)
static constexpr float CorrectionAngle = -45.;
protected: protected:
virtual void _fill_surface_single( virtual void _fill_surface_single(
const FillParams &params, const FillParams &params,