mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 17:58:03 -06:00
Refactoring of perimeters/infills wiping (ToolOrdering::WipingExtrusions now takes care of the agenda)
Squashed commit of the following: commit 931eb2684103e8571b4a2e9804765fef268361c3 Author: Lukas Matena <lukasmatena@seznam.cz> Date: Wed Jun 20 12:50:27 2018 +0200 ToolOrdering::WipingExtrusions now holds all information necessary for infill/perimeter wiping commit cc8becfbdd771f7e279434c8bd6be147e4b321ee Author: Lukas Matena <lukasmatena@seznam.cz> Date: Tue Jun 19 10:52:03 2018 +0200 Wiping is now done as normal print would be (less extra code in process_layer) commit 1b120754b0691cce46ee5e10f3840480c559ac1f Author: Lukas Matena <lukasmatena@seznam.cz> Date: Fri Jun 15 15:55:15 2018 +0200 Refactoring: ObjectByExtruder changed so that it is aware of the wiping extrusions commit 1641e326bb5e0a0c69d6bfc6efa23153dc2e4543 Author: Lukas Matena <lukasmatena@seznam.cz> Date: Thu Jun 14 12:22:18 2018 +0200 Refactoring: new class WipingExtrusion in ToolOrdering.hpp
This commit is contained in:
parent
29dd305aaa
commit
8a47852be2
8 changed files with 301 additions and 303 deletions
|
@ -200,6 +200,7 @@ protected:
|
|||
std::string extrude_multi_path(ExtrusionMultiPath multipath, std::string description = "", double speed = -1.);
|
||||
std::string extrude_path(ExtrusionPath path, std::string description = "", double speed = -1.);
|
||||
|
||||
typedef std::vector<int> ExtruderPerCopy;
|
||||
// Extruding multiple objects with soluble / non-soluble / combined supports
|
||||
// on a multi-material printer, trying to minimize tool switches.
|
||||
// Following structures sort extrusions by the extruder ID, by an order of objects and object islands.
|
||||
|
@ -215,15 +216,19 @@ protected:
|
|||
struct Region {
|
||||
ExtrusionEntityCollection perimeters;
|
||||
ExtrusionEntityCollection infills;
|
||||
std::vector<std::vector<unsigned int>> infills_per_copy_ids; // indices of infill.entities that are not part of infill wiping (an element for each object copy)
|
||||
std::vector<std::vector<unsigned int>> perimeters_per_copy_ids; // indices of infill.entities that are not part of infill wiping (an element for each object copy)
|
||||
|
||||
std::vector<const ExtruderPerCopy*> infills_overrides;
|
||||
std::vector<const ExtruderPerCopy*> perimeters_overrides;
|
||||
|
||||
// Appends perimeter/infill entities and writes don't indices of those that are not to be extruder as part of perimeter/infill wiping
|
||||
void append(const std::string& type, const ExtrusionEntityCollection* eec, const ExtruderPerCopy* copy_extruders, unsigned int object_copies_num);
|
||||
};
|
||||
|
||||
std::vector<Region> by_region; // all extrusions for this island, grouped by regions
|
||||
const std::vector<Region>& by_region_per_copy(unsigned int copy); // returns reference to subvector of by_region (only extrusions that are NOT printed during wiping into infill for this copy)
|
||||
const std::vector<Region>& by_region_per_copy(unsigned int copy, int extruder, bool wiping_entities = false); // returns reference to subvector of by_region
|
||||
|
||||
private:
|
||||
std::vector<Region> by_region_per_copy_cache; // caches vector generated by function above to avoid copying and recalculating
|
||||
unsigned int last_copy = (unsigned int)(-1); // index of last copy that by_region_per_copy was called for
|
||||
};
|
||||
std::vector<Island> islands;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue