mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 21:58:03 -06:00
ENH: improve auto-arrange in several ways
1. reduce expansion of exclusion regions 2. expand extrusion calib regions to let them touch bed boundary, to greately simplify auto-arranging with avoidance option on 3. improve dist_for_BOTTOM_LEFT to allow objects be put left to exclusion regions temporarily 4. improve on_preload for better handling objects around exclusion regions. 5. improve debug tools 6. fix a bug with wipe tower estimation (don't estimate if wipe tower is explicitly disabled) 7. use larger y-overlap threshold to estimate rod height confliction better in per-object print ordering (now we use half the clearance radius) Change-Id: Iab29d47a072d8515f28a09855432f92fcffa8c5f (cherry picked from commit 3a4f242a3a6fd2f82dcc8306cde4d1cb107a5099)
This commit is contained in:
parent
17bc464bac
commit
5fa771c6cb
8 changed files with 59 additions and 35 deletions
|
@ -481,7 +481,7 @@ public:
|
|||
auto d = bbin.center() - bb.center();
|
||||
_Rectangle<RawShape> rect(bb.width(), bb.height());
|
||||
rect.translate(bb.minCorner() + d);
|
||||
return sl::isInside(rect.transformedShape(), bin) ? -1.0 : 1;
|
||||
return sl::isInside(rect.transformedShape(), bin) ? -1.5 : 1;
|
||||
}
|
||||
|
||||
static inline double overfit(const RawShape& chull, const RawShape& bin) {
|
||||
|
@ -907,7 +907,7 @@ private:
|
|||
}
|
||||
}
|
||||
|
||||
if( best_score < global_score && best_score< LARGE_COST_TO_REJECT) {
|
||||
if( best_score < global_score) {
|
||||
auto d = (getNfpPoint(optimum) - iv) + startpos;
|
||||
final_tr = d;
|
||||
final_rot = initial_rot + rot;
|
||||
|
@ -922,7 +922,10 @@ private:
|
|||
|
||||
#ifdef SVGTOOLS_HPP
|
||||
svg::SVGWriter<RawShape> svgwriter;
|
||||
svgwriter.setSize(binbb);
|
||||
Box binbb2(binbb.width() * 2, binbb.height() * 2, binbb.center()); // expand bbox to allow object be drawed outside
|
||||
svgwriter.setSize(binbb2);
|
||||
svgwriter.conf_.x0 = binbb.width();
|
||||
svgwriter.conf_.y0 = -binbb.height()/2; // origin is top left corner
|
||||
svgwriter.writeShape(box2RawShape(binbb), "none", "black");
|
||||
for (int i = 0; i < nfps.size(); i++)
|
||||
svgwriter.writeShape(nfps[i], "none", "blue");
|
||||
|
|
|
@ -43,7 +43,7 @@ public:
|
|||
public:
|
||||
operator bool() { return item_ptr_ != nullptr; }
|
||||
double overfit() const { return overfit_; }
|
||||
double score_ = -1;
|
||||
double score_ = -1.11;
|
||||
double score() { return score_; }
|
||||
int plate_id = 0; // BBS
|
||||
};
|
||||
|
|
|
@ -35,8 +35,9 @@ public:
|
|||
|
||||
};
|
||||
|
||||
private:
|
||||
Config conf_;
|
||||
|
||||
private:
|
||||
std::vector<std::string> svg_layers_;
|
||||
bool finished_ = false;
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue