Allow rotation of multiple selected items. Disable auto positioning

This commit is contained in:
tamasmeszaros 2021-03-31 14:50:24 +02:00
parent 804758dfed
commit 649dfca8d6
6 changed files with 99 additions and 44 deletions

View file

@ -19,7 +19,9 @@ class RotoptimizeJob : public PlaterJob
static inline const FindMethod Methods[] = {
{ L("Best misalignment"), sla::find_best_misalignment_rotation },
{ L("Least supports"), sla::find_least_supports_rotation }
{ L("Least supports"), sla::find_least_supports_rotation },
// Just a min area bounding box that is done for all methods anyway.
{ L("Z axis only"), nullptr }
};
size_t m_method_id = 0;
@ -27,6 +29,15 @@ class RotoptimizeJob : public PlaterJob
DynamicPrintConfig m_default_print_cfg;
struct ObjRot
{
size_t idx;
std::optional<Vec2d> rot;
ObjRot(size_t id): idx{id}, rot{} {}
};
std::vector<ObjRot> m_selected_object_ids;
protected:
void prepare() override;