mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-27 12:52:07 +00:00
NEW: add best_object_pos for auto-arranging
For i3 printers, best object position may not be the bed center, we need to align objects to the specified best_object_pos. Jira: STUDIO-4133 Change-Id: I06e31e597d2dd8288eb24a52d836cc8a134a4111
This commit is contained in:
@@ -37,8 +37,9 @@ struct NfpPConfig {
|
||||
BOTTOM_RIGHT,
|
||||
TOP_LEFT,
|
||||
TOP_RIGHT,
|
||||
DONT_ALIGN //!> Warning: parts may end up outside the bin with the
|
||||
DONT_ALIGN, //!> Warning: parts may end up outside the bin with the
|
||||
//! default object function.
|
||||
USER_DEFINED
|
||||
};
|
||||
|
||||
/// Which angles to try out for better results.
|
||||
@@ -50,6 +51,8 @@ struct NfpPConfig {
|
||||
/// Where to start putting objects in the bin.
|
||||
Alignment starting_point;
|
||||
|
||||
TPoint<RawShape> best_object_pos;
|
||||
|
||||
/**
|
||||
* @brief A function object representing the fitting function in the
|
||||
* placement optimization process. (Optional)
|
||||
@@ -1100,6 +1103,11 @@ private:
|
||||
cb = bbin.maxCorner();
|
||||
break;
|
||||
}
|
||||
case Config::Alignment::USER_DEFINED: {
|
||||
ci = bb.center();
|
||||
cb = config_.best_object_pos;
|
||||
break;
|
||||
}
|
||||
default: ; // DONT_ALIGN
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user