improved enforcers blockers oversampling, renamed parameter
This commit is contained in:
parent
8f7b86915a
commit
a775bf2978
@ -481,11 +481,11 @@ void process_perimeter_polygon(const Polygon &orig_polygon, float z_coord, std::
|
|||||||
orig_point = true;
|
orig_point = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (global_model_info.is_enforced(position, SeamPlacer::enforcer_blocker_sqr_distance_tolerance)) {
|
if (global_model_info.is_enforced(position, SeamPlacer::enforcer_blocker_distance_tolerance)) {
|
||||||
type = EnforcedBlockedSeamPoint::Enforced;
|
type = EnforcedBlockedSeamPoint::Enforced;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (global_model_info.is_blocked(position, SeamPlacer::enforcer_blocker_sqr_distance_tolerance)) {
|
if (global_model_info.is_blocked(position, SeamPlacer::enforcer_blocker_distance_tolerance)) {
|
||||||
type = EnforcedBlockedSeamPoint::Blocked;
|
type = EnforcedBlockedSeamPoint::Blocked;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -495,7 +495,7 @@ void process_perimeter_polygon(const Polygon &orig_polygon, float z_coord, std::
|
|||||||
if (global_model_info.is_enforced(position, distance_to_next)
|
if (global_model_info.is_enforced(position, distance_to_next)
|
||||||
|| global_model_info.is_blocked(position, distance_to_next)) {
|
|| global_model_info.is_blocked(position, distance_to_next)) {
|
||||||
Vec3f vec_to_next = (pos_of_next - position).normalized();
|
Vec3f vec_to_next = (pos_of_next - position).normalized();
|
||||||
float step_size = SeamPlacer::enforcer_blocker_sqr_distance_tolerance;
|
float step_size = SeamPlacer::enforcer_blocker_distance_tolerance / 2.0f;
|
||||||
float step = step_size;
|
float step = step_size;
|
||||||
while (step < distance_to_next) {
|
while (step < distance_to_next) {
|
||||||
oversampled_points.push(position + vec_to_next * step);
|
oversampled_points.push(position + vec_to_next * step);
|
||||||
@ -929,7 +929,7 @@ void SeamPlacer::align_seam_points(const PrintObject *po, const Comparator &comp
|
|||||||
}
|
}
|
||||||
|
|
||||||
// find coefficients of polynomial fit. Z coord is treated as parameter along which to fit both X and Y coords.
|
// find coefficients of polynomial fit. Z coord is treated as parameter along which to fit both X and Y coords.
|
||||||
std::vector<Vec2f> coefficients = polyfit(points, 3);
|
std::vector<Vec2f> coefficients = polyfit(points, 4);
|
||||||
|
|
||||||
// Do alignment - compute fitted point for each point in the string from its Z coord, and store the position into
|
// Do alignment - compute fitted point for each point in the string from its Z coord, and store the position into
|
||||||
// Perimeter structure of the point; also set flag aligned to true
|
// Perimeter structure of the point; also set flag aligned to true
|
||||||
|
@ -111,7 +111,7 @@ public:
|
|||||||
static constexpr float polygon_local_angles_arm_distance = 1.0f;
|
static constexpr float polygon_local_angles_arm_distance = 1.0f;
|
||||||
|
|
||||||
// If enforcer or blocker is closer to the seam candidate than this limit, the seam candidate is set to Blocer or Enforcer
|
// If enforcer or blocker is closer to the seam candidate than this limit, the seam candidate is set to Blocer or Enforcer
|
||||||
static constexpr float enforcer_blocker_sqr_distance_tolerance = 0.1f;
|
static constexpr float enforcer_blocker_distance_tolerance = 0.1f;
|
||||||
|
|
||||||
// When searching for seam clusters for alignment:
|
// When searching for seam clusters for alignment:
|
||||||
// seam_align_tolerable_dist - if seam is closer to the previous seam position projected to the current layer than this value,
|
// seam_align_tolerable_dist - if seam is closer to the previous seam position projected to the current layer than this value,
|
||||||
|
Loading…
Reference in New Issue
Block a user