mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-14 07:52:56 +00:00
Clarify use of math functions
This commit is contained in:
@@ -329,13 +329,13 @@ namespace Slic3r {
|
||||
double object_size_x(int num_patterns) {
|
||||
return num_patterns * ((m_wall_count - 1) * line_spacing_angle()) +
|
||||
(num_patterns - 1) * (m_pattern_spacing + line_width()) +
|
||||
cos(to_radians(m_corner_angle) / 2) * m_wall_side_length +
|
||||
std::cos(to_radians(m_corner_angle) / 2) * m_wall_side_length +
|
||||
line_spacing_anchor() * m_anchor_perimeters
|
||||
;
|
||||
}
|
||||
|
||||
double object_size_y(double start_pa, double step_pa, int num_patterns) {
|
||||
return 2 * sin(to_radians(m_corner_angle) / 2) * m_wall_side_length +
|
||||
return 2 * std::sin(to_radians(m_corner_angle) / 2) * m_wall_side_length +
|
||||
max_numbering_height(start_pa, step_pa, num_patterns) +
|
||||
m_glyph_padding_vertical * 2 +
|
||||
line_width_anchor()
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#pragma once
|
||||
#define calib_pressure_advance_dd
|
||||
|
||||
#include <math.h>
|
||||
#include <string>
|
||||
#include "Point.hpp"
|
||||
namespace Slic3r {
|
||||
@@ -90,7 +89,7 @@ class calib_pressure_advance_pattern: public calib_pressure_advance
|
||||
// from slic3r documentation: spacing = extrusion_width - layer_height * (1 - PI/4)
|
||||
double line_spacing() { return line_width() - mp_gcodegen->config().layer_height.value * (1 - M_PI / 4); };
|
||||
double line_spacing_anchor() { return line_width_anchor() - mp_gcodegen->config().initial_layer_print_height.value * (1 - M_PI / 4); };
|
||||
double line_spacing_angle() { return line_spacing() / sin(to_radians(m_corner_angle) / 2); };
|
||||
double line_spacing_angle() { return line_spacing() / std::sin(to_radians(m_corner_angle) / 2); };
|
||||
|
||||
double object_size_x(int num_patterns);
|
||||
double object_size_y(double start_pa, double step_pa, int num_patterns);
|
||||
|
||||
Reference in New Issue
Block a user