Support larger printer sizes by using 64-bit.

SuperSlicer is referenced for some changes.

Co-authored-by: Merill <merill@free.fr>
This commit is contained in:
SoftFever 2024-05-10 23:42:28 +08:00
parent 5bceebdd9d
commit 9b2c2bff1d
87 changed files with 380 additions and 362 deletions

View file

@ -856,7 +856,7 @@ void debug_export_points(const std::vector<PrintObjectSeamData::LayerSeams> &lay
float max_weight = min_weight;
for (const SeamCandidate &point : layers[layer_idx].points) {
Vec3i color = value_to_rgbi(-PI, PI, point.local_ccw_angle);
Vec3i32 color = value_to_rgbi(-PI, PI, point.local_ccw_angle);
std::string fill = "rgb(" + std::to_string(color.x()) + "," + std::to_string(color.y()) + ","
+ std::to_string(color.z()) + ")";
angles_svg.draw(scaled(Vec2f(point.position.head<2>())), fill);
@ -879,19 +879,19 @@ void debug_export_points(const std::vector<PrintObjectSeamData::LayerSeams> &lay
SVG overhangs_svg { overhangs_file_name, bounding_box };
for (const SeamCandidate &point : layers[layer_idx].points) {
Vec3i color = value_to_rgbi(min_vis, max_vis, point.visibility);
Vec3i32 color = value_to_rgbi(min_vis, max_vis, point.visibility);
std::string visibility_fill = "rgb(" + std::to_string(color.x()) + "," + std::to_string(color.y()) + ","
+ std::to_string(color.z()) + ")";
visibility_svg.draw(scaled(Vec2f(point.position.head<2>())), visibility_fill);
Vec3i weight_color = value_to_rgbi(min_weight, max_weight,
Vec3i32 weight_color = value_to_rgbi(min_weight, max_weight,
-compute_angle_penalty(point.local_ccw_angle));
std::string weight_fill = "rgb(" + std::to_string(weight_color.x()) + "," + std::to_string(weight_color.y())
+ ","
+ std::to_string(weight_color.z()) + ")";
weight_svg.draw(scaled(Vec2f(point.position.head<2>())), weight_fill);
Vec3i overhang_color = value_to_rgbi(-0.5, 0.5, std::clamp(point.overhang, -0.5f, 0.5f));
Vec3i32 overhang_color = value_to_rgbi(-0.5, 0.5, std::clamp(point.overhang, -0.5f, 0.5f));
std::string overhang_fill = "rgb(" + std::to_string(overhang_color.x()) + ","
+ std::to_string(overhang_color.y())
+ ","