Merge branch 'master' of https://github.com/Prusa3d/Slic3r
This commit is contained in:
commit
206f16f374
6 changed files with 18 additions and 3 deletions
|
@ -719,12 +719,13 @@ ModelInstance* ModelObject::add_instance(const ModelInstance &other)
|
|||
return i;
|
||||
}
|
||||
|
||||
ModelInstance* ModelObject::add_instance(const Vec3d &offset, const Vec3d &scaling_factor, const Vec3d &rotation)
|
||||
ModelInstance* ModelObject::add_instance(const Vec3d &offset, const Vec3d &scaling_factor, const Vec3d &rotation, const Vec3d &mirror)
|
||||
{
|
||||
auto *instance = add_instance();
|
||||
instance->set_offset(offset);
|
||||
instance->set_scaling_factor(scaling_factor);
|
||||
instance->set_rotation(rotation);
|
||||
instance->set_mirror(mirror);
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ public:
|
|||
|
||||
ModelInstance* add_instance();
|
||||
ModelInstance* add_instance(const ModelInstance &instance);
|
||||
ModelInstance* add_instance(const Vec3d &offset, const Vec3d &scaling_factor, const Vec3d &rotation);
|
||||
ModelInstance* add_instance(const Vec3d &offset, const Vec3d &scaling_factor, const Vec3d &rotation, const Vec3d &mirror);
|
||||
void delete_instance(size_t idx);
|
||||
void delete_last_instance();
|
||||
void clear_instances();
|
||||
|
|
|
@ -3118,6 +3118,13 @@ CLIConfigDef::CLIConfigDef()
|
|||
const CLIConfigDef cli_config_def;
|
||||
DynamicPrintAndCLIConfig::PrintAndCLIConfigDef DynamicPrintAndCLIConfig::s_def;
|
||||
|
||||
void DynamicPrintAndCLIConfig::handle_legacy(t_config_option_key &opt_key, std::string &value) const
|
||||
{
|
||||
if (cli_config_def.options.find(opt_key) == cli_config_def.options.end()) {
|
||||
PrintConfigDef::handle_legacy(opt_key, value);
|
||||
}
|
||||
}
|
||||
|
||||
std::ostream& print_cli_options(std::ostream& out)
|
||||
{
|
||||
for (const auto& opt : cli_config_def.options) {
|
||||
|
|
|
@ -1171,6 +1171,12 @@ public:
|
|||
const ConfigDef* def() const override { return &s_def; }
|
||||
t_config_option_keys keys() const override { return s_def.keys(); }
|
||||
|
||||
// Verify whether the opt_key has not been obsoleted or renamed.
|
||||
// Both opt_key and value may be modified by handle_legacy().
|
||||
// If the opt_key is no more valid in this version of Slic3r, opt_key is cleared by handle_legacy().
|
||||
// handle_legacy() is called internally by set_deserialize().
|
||||
void handle_legacy(t_config_option_key &opt_key, std::string &value) const override;
|
||||
|
||||
private:
|
||||
class PrintAndCLIConfigDef : public ConfigDef
|
||||
{
|
||||
|
|
|
@ -4896,6 +4896,7 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||
}
|
||||
|
||||
m_mouse.set_start_position_2D_as_invalid();
|
||||
m_mouse.set_start_position_3D_as_invalid();
|
||||
#endif
|
||||
}
|
||||
else if (evt.Leaving())
|
||||
|
|
|
@ -2628,7 +2628,7 @@ void Plater::increase_instances(size_t num)
|
|||
float offset = 10.0;
|
||||
for (size_t i = 0; i < num; i++, offset += 10.0) {
|
||||
Vec3d offset_vec = model_instance->get_offset() + Vec3d(offset, offset, 0.0);
|
||||
model_object->add_instance(offset_vec, model_instance->get_scaling_factor(), model_instance->get_rotation());
|
||||
model_object->add_instance(offset_vec, model_instance->get_scaling_factor(), model_instance->get_rotation(), model_instance->get_mirror());
|
||||
// p->print.get_object(obj_idx)->add_copy(Slic3r::to_2d(offset_vec));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue