Infill direction enhancements (#5267)

* infill direction wip

* rotate solid infill dir
This commit is contained in:
SoftFever 2024-05-05 13:36:54 +08:00 committed by GitHub
parent c2e19b65a8
commit c2f5660afd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 47 additions and 10 deletions

View file

@ -94,6 +94,8 @@ public:
coordf_t overlap;
// in radians, ccw, 0 = East
float angle;
// Orca: enable angle shifting for layer change
bool rotate_angle{ true };
// In scaled coordinates. Maximum lenght of a perimeter segment connecting two infill lines.
// Used by the FillRectilinear2, FillGrid2, FillTriangles, FillStars and FillCubic.
// If left to zero, the links will not be limited.
@ -150,6 +152,7 @@ protected:
overlap(0.),
// Initial angle is undefined.
angle(FLT_MAX),
rotate_angle(true),
link_max_length(0),
loop_clipping(0),
// The initial bounding box is empty, therefore undefined.
@ -171,7 +174,7 @@ protected:
ExPolygon expolygon,
ThickPolylines& thick_polylines_out) {}
virtual float _layer_angle(size_t idx) const { return (idx & 1) ? float(M_PI/2.) : 0; }
virtual float _layer_angle(size_t idx) const { return (rotate_angle && (idx & 1)) ? float(M_PI/2.) : 0; }
virtual std::pair<float, Point> _infill_direction(const Surface *surface) const;