Fine tune the seam smooth/sharp angle arm length

This commit is contained in:
Martin Šach 2024-10-25 10:36:03 +02:00 committed by Lukas Matena
parent 69924efb39
commit 00010de0ee
2 changed files with 40 additions and 36 deletions

View File

@ -139,8 +139,8 @@ Params Placer::get_params(const DynamicPrintConfig &config) {
params.perimeter.embedding_threshold = 0.5;
params.perimeter.painting_radius = 0.1;
params.perimeter.simplification_epsilon = 0.001;
params.perimeter.smooth_angle_arm_length = 0.2;
params.perimeter.sharp_angle_arm_length = 0.05;
params.perimeter.smooth_angle_arm_length = 0.5;
params.perimeter.sharp_angle_arm_length = 0.25;
params.visibility.raycasting_visibility_samples_count = 30000;
params.visibility.fast_decimation_triangle_count_target = 16000;

View File

@ -124,11 +124,13 @@ constexpr const char *to_string(Perimeters::AngleType angle_type) {
throw std::runtime_error("Unreachable");
}
void serialize_shell(std::ostream &output, const Shells::Shell<Perimeters::Perimeter> &shell) {
void serialize_shells(std::ostream &output, const Shells::Shells<> &shells) {
output << "x,y,z,point_type,point_classification,angle_type,layer_index,"
"point_index,distance,distance_to_previous,is_degenerate"
"point_index,distance,distance_to_previous,is_degenerate,shell_index"
<< std::endl;
for (std::size_t shell_index{0}; shell_index < shells.size(); ++shell_index) {
const Shells::Shell<> &shell{shells[shell_index]};
for (std::size_t perimeter_index{0}; perimeter_index < shell.size(); ++perimeter_index) {
const Shells::Slice<> &slice{shell[perimeter_index]};
const Perimeters::Perimeter &perimeter{slice.boundary};
@ -160,10 +162,12 @@ void serialize_shell(std::ostream &output, const Shells::Shell<Perimeters::Perim
<< point_index << ","
<< distance << ","
<< distance_to_previous << ","
<< is_degenerate << std::endl;
<< is_degenerate << ","
<< shell_index << std::endl;
// clang-format on
}
}
}
}
TEST_CASE_METHOD(Test::SeamsFixture, "Create perimeters", "[Seams][SeamPerimeters][Integration]") {
@ -175,6 +179,6 @@ TEST_CASE_METHOD(Test::SeamsFixture, "Create perimeters", "[Seams][SeamPerimeter
if constexpr (debug_files) {
std::ofstream csv{"perimeters.csv"};
serialize_shell(csv, shells[0]);
serialize_shells(csv, shells);
}
}