mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
ENH: enable arachne for concentric pattern
Enable arachne for concentric pattern by referring to PrusaSlicer Also remove useless pattern we added. Signed-off-by: salt.wei <salt.wei@bambulab.com> Change-Id: Ie2574f7fc4751ebdf1caab4de52013f3101e104f
This commit is contained in:
parent
df321f8cd9
commit
db9ade2257
10 changed files with 153 additions and 167 deletions
|
@ -63,6 +63,9 @@ struct FillParams
|
|||
// in this case we don't try to make more continuous paths
|
||||
bool complete { false };
|
||||
|
||||
// For Concentric infill, to switch between Classic and Arachne.
|
||||
bool use_arachne{ false };
|
||||
|
||||
// BBS
|
||||
Flow flow;
|
||||
ExtrusionRole extrusion_role{ ExtrusionRole(0) };
|
||||
|
@ -121,6 +124,7 @@ public:
|
|||
|
||||
// Perform the fill.
|
||||
virtual Polylines fill_surface(const Surface *surface, const FillParams ¶ms);
|
||||
virtual ThickPolylines fill_surface_arachne(const Surface* surface, const FillParams& params);
|
||||
|
||||
// BBS: this method is used to fill the ExtrusionEntityCollection.
|
||||
// It call fill_surface by default
|
||||
|
@ -149,6 +153,13 @@ protected:
|
|||
ExPolygon /* expolygon */,
|
||||
Polylines & /* polylines_out */) {};
|
||||
|
||||
// Used for concentric infill to generate ThickPolylines using Arachne.
|
||||
virtual void _fill_surface_single(const FillParams& params,
|
||||
unsigned int thickness_layers,
|
||||
const std::pair<float, Point>& direction,
|
||||
ExPolygon expolygon,
|
||||
ThickPolylines& thick_polylines_out) {}
|
||||
|
||||
virtual float _layer_angle(size_t idx) const { return (idx & 1) ? float(M_PI/2.) : 0; }
|
||||
|
||||
virtual std::pair<float, Point> _infill_direction(const Surface *surface) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue