FIX: fix build error
jira: none Change-Id: Ie732916565536fc86b8dbf19b24ea99541f54772
This commit is contained in:
parent
859f6345e2
commit
7cc564fcc9
|
@ -147,7 +147,7 @@ std::map<int, std::string> cli_errors = {
|
|||
{CLI_FILAMENT_CAN_NOT_MAP, "Some filaments cannot be mapped to correct extruders for multi-extruder Printer."},
|
||||
{CLI_SLICING_ERROR, "Failed slicing the model. Please verify the slicing of all plates on Bambu Studio before uploading."},
|
||||
{CLI_GCODE_PATH_CONFLICTS, " G-code conflicts detected after slicing. Please make sure the 3mf file can be successfully sliced in the latest Bambu Studio."},
|
||||
{CLI_GCODE_PATH_IN_UNPRINTABLE_AREA, "Found G-code in unprintable area of multi-extruder printers after slicing. Please make sure the 3mf file can be successfully sliced in the latest Bambu Studio."}
|
||||
{CLI_GCODE_PATH_IN_UNPRINTABLE_AREA, "Found G-code in unprintable area of multi-extruder printers after slicing. Please make sure the 3mf file can be successfully sliced in the latest Bambu Studio."},
|
||||
{CLI_FILAMENT_UNPRINTABLE_ON_FIRST_LAYER, "Found some filament unprintable at first layer on current Plate. Please make sure the 3mf file can be successfully sliced with the same Plate type in the latest Bambu Studio."}
|
||||
};
|
||||
|
||||
|
|
|
@ -2590,8 +2590,7 @@ void GCode::process_layers(
|
|||
print.throw_if_canceled();
|
||||
GCode::LayerResult res = this->process_layer(print, layer.second, layer_tools, &layer == &layers_to_print.back(), &print_object_instances_ordering, size_t(-1));
|
||||
res.gcode_store_pos = layer_to_print_idx - 1;
|
||||
layers_results[layer_to_print_idx - 1] = std::move(res);
|
||||
return layers_results[layer_to_print_idx - 1];
|
||||
return std::move(res);
|
||||
}
|
||||
});
|
||||
if (m_spiral_vase) {
|
||||
|
|
|
@ -868,21 +868,7 @@ WipeTower::ToolChangeResult WipeTower::tool_change(size_t tool, bool extrude_per
|
|||
box_coordinates wt_box(Vec2f(0.f, (m_current_shape == SHAPE_REVERSED) ? m_layer_info->toolchanges_depth() - m_layer_info->depth : 0.f), m_wipe_tower_width,
|
||||
m_layer_info->depth + m_perimeter_width);
|
||||
|
||||
Vec2f pos = initial_position;
|
||||
switch (m_cur_layer_id % 4) {
|
||||
case 0: pos = wt_box.ld; break;
|
||||
case 1: pos = wt_box.rd; break;
|
||||
case 2: pos = wt_box.ru; break;
|
||||
case 3: pos = wt_box.lu; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
writer.travel(Vec2f(0, pos.y()));
|
||||
writer.travel(pos);
|
||||
writer.set_initial_position(pos, m_wipe_tower_width, m_wipe_tower_depth, m_internal_rotation);
|
||||
|
||||
// align the perimeter
|
||||
|
||||
Vec2f pos = initial_position;
|
||||
switch (m_cur_layer_id % 4){
|
||||
case 0:
|
||||
|
|
|
@ -1291,10 +1291,8 @@ public:
|
|||
static std::string get_ftp_folder(std::string type_str);
|
||||
static bool get_printer_is_enclosed(std::string type_str);
|
||||
static bool load_filaments_blacklist_config();
|
||||
static void check_filaments_in_blacklist(std::string tag_vendor, std::string tag_type, bool& in_blacklist, std::string& ac, std::string& info);
|
||||
static std::vector<std::string> get_resolution_supported(std::string type_str);
|
||||
static std::vector<std::string> get_compatible_machine(std::string type_str);
|
||||
static bool load_filaments_blacklist_config();
|
||||
static void check_filaments_in_blacklist(std::string tag_vendor, std::string tag_type, int ams_id, bool &in_blacklist, std::string &ac, std::string &info);
|
||||
static boost::bimaps::bimap<std::string, std::string> get_all_model_id_with_name();
|
||||
static std::string load_gcode(std::string type_str, std::string gcode_file);
|
||||
|
|
|
@ -1177,87 +1177,6 @@ void Selection::setup_cache()
|
|||
set_caches();
|
||||
}
|
||||
|
||||
void Selection::translate(const Vec3d &displacement, bool local)
|
||||
{
|
||||
if (!m_valid)
|
||||
return;
|
||||
|
||||
EMode translation_type = m_mode;
|
||||
//BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << boost::format(": %1%, displacement {%2%, %3%, %4%}") % __LINE__ % displacement(X) % displacement(Y) % displacement(Z);
|
||||
|
||||
for (unsigned int i : m_list) {
|
||||
GLVolume& v = *(*m_volumes)[i];
|
||||
if (v.is_wipe_tower) {
|
||||
int plate_idx = v.object_idx() - 1000;
|
||||
|
||||
PartPlate* part_plate = wxGetApp().plater()->get_partplate_list().get_plate(plate_idx);
|
||||
BoundingBoxf3 plate_bbox = part_plate->get_bounding_box();
|
||||
BoundingBoxf plate_bbox_2d(Vec2d(plate_bbox.min(0), plate_bbox.min(1)), Vec2d(plate_bbox.max(0), plate_bbox.max(1)));
|
||||
const std::vector<Pointfs>& extruder_areas = part_plate->get_extruder_areas();
|
||||
for (Pointfs points : extruder_areas) {
|
||||
BoundingBoxf bboxf(points);
|
||||
plate_bbox_2d.min = plate_bbox_2d.min(0) >= bboxf.min(0) ? plate_bbox_2d.min : bboxf.min;
|
||||
plate_bbox_2d.max = plate_bbox_2d.max(0) <= bboxf.max(0) ? plate_bbox_2d.max : bboxf.max;
|
||||
}
|
||||
|
||||
Vec3d tower_size = v.bounding_box().size();
|
||||
Vec3d tower_origin = m_cache.volumes_data[i].get_volume_position();
|
||||
Vec3d actual_displacement = displacement;
|
||||
const double margin = WIPE_TOWER_MARGIN;
|
||||
|
||||
if (!local)
|
||||
actual_displacement = (m_cache.volumes_data[i].get_instance_rotation_matrix() * m_cache.volumes_data[i].get_instance_scale_matrix() * m_cache.volumes_data[i].get_instance_mirror_matrix()).inverse() * displacement;
|
||||
|
||||
if (tower_origin(0) + actual_displacement(0) - margin < plate_bbox_2d.min(0)) {
|
||||
actual_displacement(0) = plate_bbox_2d.min(0) - tower_origin(0) + margin;
|
||||
}
|
||||
else if (tower_origin(0) + actual_displacement(0) + tower_size(0) + margin > plate_bbox_2d.max(0)) {
|
||||
actual_displacement(0) = plate_bbox_2d.max(0) - tower_origin(0) - tower_size(0) - margin;
|
||||
}
|
||||
|
||||
if (tower_origin(1) + actual_displacement(1) - margin < plate_bbox_2d.min(1)) {
|
||||
actual_displacement(1) = plate_bbox_2d.min(1) - tower_origin(1) + margin;
|
||||
}
|
||||
else if (tower_origin(1) + actual_displacement(1) + tower_size(1) + margin > plate_bbox_2d.max(1)) {
|
||||
actual_displacement(1) = plate_bbox_2d.max(1) - tower_origin(1) - tower_size(1) - margin;
|
||||
}
|
||||
|
||||
v.set_volume_offset(m_cache.volumes_data[i].get_volume_position() + actual_displacement);
|
||||
}
|
||||
else if (m_mode == Volume || v.is_wipe_tower) {
|
||||
if (local)
|
||||
v.set_volume_offset(m_cache.volumes_data[i].get_volume_position() + displacement);
|
||||
else {
|
||||
const Vec3d local_displacement = (m_cache.volumes_data[i].get_instance_rotation_matrix() * m_cache.volumes_data[i].get_instance_scale_matrix() * m_cache.volumes_data[i].get_instance_mirror_matrix()).inverse() * displacement;
|
||||
v.set_volume_offset(m_cache.volumes_data[i].get_volume_position() + local_displacement);
|
||||
}
|
||||
}
|
||||
else if (m_mode == Instance) {
|
||||
if (is_from_fully_selected_instance(i))
|
||||
v.set_instance_offset(m_cache.volumes_data[i].get_instance_position() + displacement);
|
||||
else {
|
||||
const Vec3d local_displacement = (m_cache.volumes_data[i].get_instance_rotation_matrix() * m_cache.volumes_data[i].get_instance_scale_matrix() * m_cache.volumes_data[i].get_instance_mirror_matrix()).inverse() * displacement;
|
||||
v.set_volume_offset(m_cache.volumes_data[i].get_volume_position() + local_displacement);
|
||||
translation_type = Volume;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if !DISABLE_INSTANCES_SYNCH
|
||||
if (translation_type == Instance)
|
||||
synchronize_unselected_instances(SYNC_ROTATION_NONE);
|
||||
else if (translation_type == Volume)
|
||||
synchronize_unselected_volumes();
|
||||
#endif // !DISABLE_INSTANCES_SYNCH
|
||||
if (wxGetApp().plater()->canvas3D()->get_canvas_type() != GLCanvas3D::ECanvasType::CanvasAssembleView) {
|
||||
ensure_not_below_bed();
|
||||
}
|
||||
set_bounding_boxes_dirty();
|
||||
if (wxGetApp().plater()->canvas3D()->get_canvas_type() != GLCanvas3D::ECanvasType::CanvasAssembleView) {
|
||||
wxGetApp().plater()->canvas3D()->requires_check_outside_state();
|
||||
}
|
||||
}
|
||||
|
||||
void Selection::translate(const Vec3d &displacement, TransformationType transformation_type)
|
||||
{
|
||||
if (!m_valid) return;
|
||||
|
|
Loading…
Reference in New Issue