Fixed conflicts after merge with master
This commit is contained in:
commit
9ca9fa4752
3 changed files with 12 additions and 15 deletions
|
@ -1231,13 +1231,13 @@ struct LayerCurlingEstimator
|
|||
|
||||
if (fabs(dist_from_prev_layer) < 2.0f * flow_width) {
|
||||
const ExtrusionLine &nearest_line = prev_layer_lines.get_line(nearest_line_idx);
|
||||
current_line.malformation += 0.85 * nearest_line.malformation;
|
||||
current_line.malformation += 0.9 * nearest_line.malformation;
|
||||
}
|
||||
if (dist_from_prev_layer > min_malformation_dist && dist_from_prev_layer < max_malformation_dist) {
|
||||
float factor = std::abs(dist_from_prev_layer - (max_malformation_dist + min_malformation_dist) * 0.5) /
|
||||
(max_malformation_dist - min_malformation_dist);
|
||||
float factor = 0.5f + 0.5f * std::abs(dist_from_prev_layer - (max_malformation_dist + min_malformation_dist) * 0.5) /
|
||||
(max_malformation_dist - min_malformation_dist);
|
||||
malformation_acc.add_distance(current_line.len);
|
||||
current_line.malformation += l->height * factor * (2.0f + 3.0f * (malformation_acc.max_curvature / PI));
|
||||
current_line.malformation += l->height * factor * (1.5f + 3.0f * (malformation_acc.max_curvature / PI));
|
||||
current_line.malformation = std::min(current_line.malformation, float(l->height * params.max_malformation_factor));
|
||||
} else {
|
||||
malformation_acc.reset();
|
||||
|
|
|
@ -26,7 +26,7 @@ struct Params {
|
|||
// the algorithm should use the following units for all computations: distance [mm], mass [g], time [s], force [g*mm/s^2]
|
||||
const float bridge_distance = 12.0f; //mm
|
||||
const float bridge_distance_decrease_by_curvature_factor = 5.0f; // allowed bridge distance = bridge_distance / (1 + this factor * (curvature / PI) )
|
||||
const std::pair<float,float> malformation_overlap_factor = std::pair<float, float> { 0.45, -0.1 };
|
||||
const std::pair<float,float> malformation_overlap_factor = std::pair<float, float> { 0.50, -0.1 };
|
||||
const float max_malformation_factor = 10.0f;
|
||||
|
||||
const float min_distance_between_support_points = 3.0f; //mm
|
||||
|
|
|
@ -821,7 +821,7 @@ void GLGizmoMeasure::on_render()
|
|||
m_cylinder.model.set_color(colors.back());
|
||||
m_cylinder.model.render();
|
||||
if (update_raycasters_transform) {
|
||||
auto it = m_raycasters.find(EDGE_ID);
|
||||
auto it = m_raycasters.find(EDGE_ID);
|
||||
if (it != m_raycasters.end() && it->second != nullptr)
|
||||
it->second->set_transform(edge_matrix);
|
||||
}
|
||||
|
@ -830,15 +830,12 @@ void GLGizmoMeasure::on_render()
|
|||
}
|
||||
case Measure::SurfaceFeatureType::Plane:
|
||||
{
|
||||
// no need to render the plane in case it is rendered with the same color as the volume in the 3D scene
|
||||
if (colors.front() != m_parent.get_selection().get_first_volume()->render_color) {
|
||||
const auto& [idx, normal, pt] = feature.get_plane();
|
||||
assert(idx < m_plane_models_cache.size());
|
||||
set_matrix_uniforms(Transform3d::Identity());
|
||||
set_emission_uniform(colors.front(), hover);
|
||||
m_plane_models_cache[idx].set_color(colors.front());
|
||||
m_plane_models_cache[idx].render();
|
||||
}
|
||||
const auto& [idx, normal, pt] = feature.get_plane();
|
||||
assert(idx < m_plane_models_cache.size());
|
||||
set_matrix_uniforms(Transform3d::Identity());
|
||||
set_emission_uniform(colors.front(), hover);
|
||||
m_plane_models_cache[idx].set_color(colors.front());
|
||||
m_plane_models_cache[idx].render();
|
||||
if (update_raycasters_transform) {
|
||||
auto it = m_raycasters.find(PLANE_ID);
|
||||
if (it != m_raycasters.end() && it->second != nullptr)
|
||||
|
|
Loading…
Add table
Reference in a new issue