mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-25 11:52:05 +00:00
ENH: add new arrangement features for wrapping detection area
Jira: STUDIO-13735 Change-Id: I198d19f5e6ef70f0adfa6370269290c81d21a557 (cherry picked from commit dc83637652526111611d0833d5f5798aaa3e7be7)
This commit is contained in:
@@ -4175,7 +4175,15 @@ struct Plater::priv
|
||||
// fills the m_bed.m_grid_lines and sets m_bed.m_origin.
|
||||
// Sets m_bed.m_polygon to limit the object placement.
|
||||
//BBS: add bed exclude area
|
||||
void set_bed_shape(const Pointfs& shape, const Pointfs& exclude_areas, const double printable_height, std::vector<Pointfs> extruder_areas, std::vector<double> extruder_heights, const std::string& custom_texture, const std::string& custom_model, bool force_as_custom = false);
|
||||
void set_bed_shape(const Pointfs &shape,
|
||||
const Pointfs &exclude_areas,
|
||||
const Pointfs &wrapping_exclude_areas,
|
||||
const double printable_height,
|
||||
std::vector<Pointfs> extruder_areas,
|
||||
std::vector<double> extruder_heights,
|
||||
const std::string &custom_texture,
|
||||
const std::string &custom_model,
|
||||
bool force_as_custom = false);
|
||||
|
||||
bool can_delete() const;
|
||||
bool can_delete_all() const;
|
||||
@@ -4334,7 +4342,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
|
||||
, main_frame(main_frame)
|
||||
//BBS: add bed_exclude_area
|
||||
, config(Slic3r::DynamicPrintConfig::new_from_defaults_keys({
|
||||
"printable_area", "bed_exclude_area", "extruder_printable_area", "bed_custom_texture", "bed_custom_model", "print_sequence",
|
||||
"printable_area", "bed_exclude_area", "wrapping_exclude_area", "extruder_printable_area", "bed_custom_texture", "bed_custom_model", "print_sequence",
|
||||
"extruder_clearance_radius",
|
||||
"extruder_clearance_height_to_lid", "extruder_clearance_height_to_rod",
|
||||
"nozzle_height", "skirt_type", "skirt_loops", "skirt_speed","min_skirt_length", "skirt_distance", "skirt_start_angle",
|
||||
@@ -10215,7 +10223,15 @@ bool Plater::priv::show_publish_dlg(bool show)
|
||||
}
|
||||
|
||||
//BBS: add bed exclude area
|
||||
void Plater::priv::set_bed_shape(const Pointfs& shape, const Pointfs& exclude_areas, const double printable_height, std::vector<Pointfs> extruder_areas, std::vector<double> extruder_heights, const std::string& custom_texture, const std::string& custom_model, bool force_as_custom)
|
||||
void Plater::priv::set_bed_shape(const Pointfs &shape,
|
||||
const Pointfs &exclude_areas,
|
||||
const Pointfs &wrapping_exclude_areas,
|
||||
const double printable_height,
|
||||
std::vector<Pointfs> extruder_areas,
|
||||
std::vector<double> extruder_heights,
|
||||
const std::string &custom_texture,
|
||||
const std::string &custom_model,
|
||||
bool force_as_custom)
|
||||
{
|
||||
//Orca: reduce resolution for large bed printer
|
||||
BoundingBoxf bed_size = get_extents(shape);
|
||||
@@ -10234,7 +10250,9 @@ void Plater::priv::set_bed_shape(const Pointfs& shape, const Pointfs& exclude_ar
|
||||
double height_to_rod = config->opt_float("extruder_clearance_height_to_rod");
|
||||
|
||||
Pointfs prev_exclude_areas = partplate_list.get_exclude_area();
|
||||
new_shape |= (height_to_lid != prev_height_lid) || (height_to_rod != prev_height_rod) || (prev_exclude_areas != exclude_areas);
|
||||
Pointfs prev_wrapping_exclude_areas = partplate_list.get_wrapping_exclude_area();
|
||||
new_shape |= (height_to_lid != prev_height_lid) || (height_to_rod != prev_height_rod) || (prev_exclude_areas != exclude_areas)
|
||||
|| (prev_wrapping_exclude_areas != wrapping_exclude_areas);
|
||||
if (!new_shape && partplate_list.get_logo_texture_filename() != custom_texture) {
|
||||
partplate_list.update_logo_texture_filename(custom_texture);
|
||||
}
|
||||
@@ -10250,7 +10268,7 @@ void Plater::priv::set_bed_shape(const Pointfs& shape, const Pointfs& exclude_ar
|
||||
|
||||
//Pointfs& exclude_areas = config->option<ConfigOptionPoints>("bed_exclude_area")->values;
|
||||
partplate_list.reset_size(max.x() - min.x() - Bed3D::Axes::DefaultTipRadius, max.y() - min.y() - Bed3D::Axes::DefaultTipRadius, z);
|
||||
partplate_list.set_shapes(shape, exclude_areas, extruder_areas, extruder_heights, custom_texture, height_to_lid, height_to_rod);
|
||||
partplate_list.set_shapes(shape, exclude_areas, wrapping_exclude_areas, extruder_areas, extruder_heights, custom_texture, height_to_lid, height_to_rod);
|
||||
|
||||
Vec2d new_shape_position = partplate_list.get_current_shape_position();
|
||||
if (shape_position != new_shape_position)
|
||||
@@ -15490,6 +15508,7 @@ void Plater::set_bed_shape() const
|
||||
set_bed_shape(p->config->option<ConfigOptionPoints>("printable_area")->values,
|
||||
//BBS: add bed exclude areas
|
||||
p->config->option<ConfigOptionPoints>("bed_exclude_area")->values,
|
||||
p->config->option<ConfigOptionPoints>("wrapping_exclude_area")->values,
|
||||
p->config->option<ConfigOptionFloat>("printable_height")->value,
|
||||
p->config->option<ConfigOptionPointsGroups>("extruder_printable_area")->values,
|
||||
p->config->option<ConfigOptionFloatsNullable>("extruder_printable_height")->values,
|
||||
@@ -15498,9 +15517,9 @@ void Plater::set_bed_shape() const
|
||||
}
|
||||
|
||||
//BBS: add bed exclude area
|
||||
void Plater::set_bed_shape(const Pointfs& shape, const Pointfs& exclude_area, const double printable_height, std::vector<Pointfs> extruder_areas, std::vector<double> extruder_heights, const std::string& custom_texture, const std::string& custom_model, bool force_as_custom) const
|
||||
void Plater::set_bed_shape(const Pointfs& shape, const Pointfs& exclude_area, const Pointfs& wrapping_exclude_area, const double printable_height, std::vector<Pointfs> extruder_areas, std::vector<double> extruder_heights, const std::string& custom_texture, const std::string& custom_model, bool force_as_custom) const
|
||||
{
|
||||
p->set_bed_shape(make_counter_clockwise(shape), exclude_area, printable_height, extruder_areas, extruder_heights, custom_texture, custom_model, force_as_custom);
|
||||
p->set_bed_shape(make_counter_clockwise(shape), exclude_area, wrapping_exclude_area, printable_height, extruder_areas, extruder_heights, custom_texture, custom_model, force_as_custom);
|
||||
}
|
||||
|
||||
void Plater::force_filament_colors_update()
|
||||
|
||||
Reference in New Issue
Block a user