mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-09-21 07:03:11 +08:00
FIX: raft of tree support was incorrect
1. Raft was not generated when tree support is selected but enable_support is false. 2. Raft angle and density of tree support was incorrect github: #3675 Change-Id: Ifd78bf619a28eb03a908e75ad56af4934b6b08b7 (cherry picked from commit 2a448095a2fb4a2abebb0a5c8082a2ddbb635f16)
This commit is contained in:
parent
84fe7393e7
commit
e7ffe31cb3
@ -1356,12 +1356,13 @@ void TreeSupport::generate_toolpaths()
|
|||||||
auto raft_areas1 = offset_ex(raft_areas, scale_(expand_offset));
|
auto raft_areas1 = offset_ex(raft_areas, scale_(expand_offset));
|
||||||
|
|
||||||
Flow support_flow = Flow(support_extrusion_width, ts_layer->height, nozzle_diameter);
|
Flow support_flow = Flow(support_extrusion_width, ts_layer->height, nozzle_diameter);
|
||||||
Fill* filler_interface = Fill::new_from_type(ipRectilinear);
|
Fill* filler_raft = Fill::new_from_type(ipRectilinear);
|
||||||
filler_interface->angle = layer_nr == 0 ? 90 : 0;
|
filler_raft->angle = layer_nr == 0 ? PI/2 : 0;
|
||||||
filler_interface->spacing = support_extrusion_width;
|
filler_raft->spacing = support_flow.spacing();
|
||||||
|
|
||||||
FillParams fill_params;
|
FillParams fill_params;
|
||||||
fill_params.density = object_config.raft_first_layer_density * 0.01;
|
coordf_t raft_density = std::min(1., support_flow.spacing() / (object_config.support_base_pattern_spacing.value + support_flow.spacing()));
|
||||||
|
fill_params.density = layer_nr == 0 ? object_config.raft_first_layer_density * 0.01 : raft_density;
|
||||||
fill_params.dont_adjust = true;
|
fill_params.dont_adjust = true;
|
||||||
|
|
||||||
// wall of first layer raft
|
// wall of first layer raft
|
||||||
@ -1372,7 +1373,7 @@ void TreeSupport::generate_toolpaths()
|
|||||||
raft_areas1 = offset_ex(raft_areas1, -flow.scaled_spacing() / 2.);
|
raft_areas1 = offset_ex(raft_areas1, -flow.scaled_spacing() / 2.);
|
||||||
}
|
}
|
||||||
fill_expolygons_generate_paths(ts_layer->support_fills.entities, raft_areas1,
|
fill_expolygons_generate_paths(ts_layer->support_fills.entities, raft_areas1,
|
||||||
filler_interface, fill_params, erSupportMaterial, support_flow);
|
filler_raft, fill_params, erSupportMaterial, support_flow);
|
||||||
}
|
}
|
||||||
|
|
||||||
// subtract the non-raft support bases, otherwise we'll get support base on top of raft interfaces which is not stable
|
// subtract the non-raft support bases, otherwise we'll get support base on top of raft interfaces which is not stable
|
||||||
@ -1395,8 +1396,8 @@ void TreeSupport::generate_toolpaths()
|
|||||||
|
|
||||||
Flow support_flow(support_extrusion_width, ts_layer->height, nozzle_diameter);
|
Flow support_flow(support_extrusion_width, ts_layer->height, nozzle_diameter);
|
||||||
Fill* filler_interface = Fill::new_from_type(ipRectilinear);
|
Fill* filler_interface = Fill::new_from_type(ipRectilinear);
|
||||||
filler_interface->angle = 0;
|
filler_interface->angle = PI / 2; // interface should be perpendicular to base
|
||||||
filler_interface->spacing = support_extrusion_width;
|
filler_interface->spacing = support_flow.spacing();
|
||||||
|
|
||||||
FillParams fill_params;
|
FillParams fill_params;
|
||||||
fill_params.density = interface_density;
|
fill_params.density = interface_density;
|
||||||
@ -1602,10 +1603,6 @@ void deleteDirectoryContents(const std::filesystem::path& dir)
|
|||||||
|
|
||||||
void TreeSupport::generate()
|
void TreeSupport::generate()
|
||||||
{
|
{
|
||||||
bool tree_support_enable = m_object_config->enable_support.value && is_tree(m_object_config->support_type.value);
|
|
||||||
if (!tree_support_enable)
|
|
||||||
return;
|
|
||||||
|
|
||||||
auto t_start = std::chrono::high_resolution_clock::now();
|
auto t_start = std::chrono::high_resolution_clock::now();
|
||||||
|
|
||||||
if (support_style == smsTreeOrganic) {
|
if (support_style == smsTreeOrganic) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user