mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-06 07:48:44 +03:00
Compare commits
4 Commits
refactor/a
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b97ca3c0ac | ||
|
|
f73566dd2b | ||
|
|
7fbfb7ba87 | ||
|
|
23bd320076 |
@@ -39,7 +39,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
"detect_narrow_internal_solid_infill": "1",
|
||||
"dont_filter_internal_bridges": "disabled",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enforce_support_layers": "0",
|
||||
"ensure_vertical_shell_thickness": "ensure_all",
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
"detect_narrow_internal_solid_infill": "1",
|
||||
"dont_filter_internal_bridges": "disabled",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enforce_support_layers": "0",
|
||||
"ensure_vertical_shell_thickness": "ensure_all",
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
"detect_narrow_internal_solid_infill": "1",
|
||||
"dont_filter_internal_bridges": "disabled",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enforce_support_layers": "0",
|
||||
"ensure_vertical_shell_thickness": "ensure_all",
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
"detect_narrow_internal_solid_infill": "1",
|
||||
"dont_filter_internal_bridges": "disabled",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enforce_support_layers": "0",
|
||||
"ensure_vertical_shell_thickness": "ensure_all",
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "1",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
"detect_narrow_internal_solid_infill": "1",
|
||||
"dont_filter_internal_bridges": "disabled",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enforce_support_layers": "0",
|
||||
"ensure_vertical_shell_thickness": "ensure_all",
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"draft_shield": "disabled",
|
||||
"elefant_foot_compensation": "0.15",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enable_prime_tower": "0",
|
||||
"enable_support": "0",
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
"detect_narrow_internal_solid_infill": "1",
|
||||
"dont_filter_internal_bridges": "disabled",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enforce_support_layers": "0",
|
||||
"ensure_vertical_shell_thickness": "ensure_all",
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
"detect_narrow_internal_solid_infill": "1",
|
||||
"dont_filter_internal_bridges": "disabled",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enforce_support_layers": "0",
|
||||
"ensure_vertical_shell_thickness": "ensure_all",
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
"detect_narrow_internal_solid_infill": "1",
|
||||
"dont_filter_internal_bridges": "disabled",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enforce_support_layers": "0",
|
||||
"ensure_vertical_shell_thickness": "ensure_all",
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
"detect_narrow_internal_solid_infill": "1",
|
||||
"dont_filter_internal_bridges": "disabled",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enforce_support_layers": "0",
|
||||
"ensure_vertical_shell_thickness": "ensure_all",
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
"detect_narrow_internal_solid_infill": "1",
|
||||
"dont_filter_internal_bridges": "disabled",
|
||||
"elefant_foot_compensation_layers": "1",
|
||||
"enable_arc_fitting": "1",
|
||||
"enable_arc_fitting": "0",
|
||||
"enable_overhang_speed": "1",
|
||||
"enforce_support_layers": "0",
|
||||
"ensure_vertical_shell_thickness": "ensure_all",
|
||||
|
||||
@@ -7054,7 +7054,7 @@ int CLI::run(int argc, char **argv)
|
||||
gcode_viewer.render_calibration_thumbnail(*calibration_data, cali_thumbnail_width, cali_thumbnail_height,
|
||||
calibration_params, partplate_list, opengl_mgr);
|
||||
//generate_calibration_thumbnail(*calibration_data, thumbnail_width, thumbnail_height, calibration_params);
|
||||
//*plate_bboxes[index] = p->generate_first_layer_bbox();
|
||||
// *plate_bboxes[index] = p->generate_first_layer_bbox();
|
||||
calibration_thumbnails.push_back(calibration_data);*/
|
||||
|
||||
PlateBBoxData* plate_bbox = new PlateBBoxData();
|
||||
|
||||
@@ -54,12 +54,12 @@ public:
|
||||
int & i,
|
||||
Eigen::Matrix<double, 1, 3> &closest)
|
||||
{
|
||||
size_t idx_unsigned = 0;
|
||||
Vec3d closest_vec3d(closest);
|
||||
double dist =
|
||||
size_t idx_unsigned { 0 };
|
||||
Vec3d closest_vec3d { Vec3d::Zero() };
|
||||
const double dist {
|
||||
AABBTreeIndirect::squared_distance_to_indexed_triangle_set(
|
||||
its.vertices, its.indices, m_tree, point, idx_unsigned,
|
||||
closest_vec3d);
|
||||
closest_vec3d) };
|
||||
i = int(idx_unsigned);
|
||||
closest = closest_vec3d;
|
||||
return dist;
|
||||
@@ -311,10 +311,9 @@ AABBMesh::hit_result IndexedMesh::filter_hits(
|
||||
|
||||
|
||||
double AABBMesh::squared_distance(const Vec3d &p, int& i, Vec3d& c) const {
|
||||
double sqdst = 0;
|
||||
Eigen::Matrix<double, 1, 3> pp = p;
|
||||
Eigen::Matrix<double, 1, 3> cc;
|
||||
sqdst = m_aabb->squared_distance(*m_tm, pp, i, cc);
|
||||
const Eigen::Matrix<double, 1, 3> pp { p };
|
||||
Eigen::Matrix<double, 1, 3> cc { Vec3d::Zero() };
|
||||
const double sqdst { m_aabb->squared_distance(*m_tm, pp, i, cc) };
|
||||
c = cc;
|
||||
return sqdst;
|
||||
}
|
||||
|
||||
@@ -883,7 +883,7 @@ std::string AppConfig::load()
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch(std::exception err) {
|
||||
} catch(const std::exception &err) {
|
||||
BOOST_LOG_TRIVIAL(info) << format("parse app config \"%1%\", error: %2%", AppConfig::loading_path(), err.what());
|
||||
|
||||
return err.what();
|
||||
|
||||
@@ -3576,7 +3576,7 @@ Polylines FillLateralHoneycomb::fill_surface(const Surface *surface, const FillP
|
||||
// |
|
||||
// |
|
||||
// 0 --+--
|
||||
// / \
|
||||
// ⟋ ⟍
|
||||
// why inverted?
|
||||
// it makes determining some of the properties easier
|
||||
// and the two angled legs provide additional horizontal stiffness
|
||||
|
||||
@@ -712,7 +712,7 @@ unsigned int Step::get_triangle_num(double linear_deflection, double angle_defle
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
} catch(Exception e) {
|
||||
} catch(const Exception &e) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -5511,7 +5511,7 @@ LayerResult GCode::process_layer(
|
||||
// add tag for processor
|
||||
gcode += ";" + GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Layer_Change) + "\n";
|
||||
// export layer z
|
||||
char buf[64];
|
||||
char buf[80];
|
||||
sprintf(buf, print.is_BBL_printer() ? "; Z_HEIGHT: %g\n" : ";Z:%g\n", print_z);
|
||||
gcode += buf;
|
||||
// export layer height
|
||||
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
|
||||
void* volume{nullptr};
|
||||
std::vector<int>* plane_indices{nullptr};
|
||||
Transform3d world_tran;
|
||||
Transform3d world_tran = Transform3d::Identity();
|
||||
std::shared_ptr<std::vector<SurfaceFeature>> world_plane_features{nullptr};
|
||||
std::shared_ptr<SurfaceFeature> origin_surface_feature{nullptr};
|
||||
|
||||
|
||||
@@ -48,100 +48,50 @@ struct OrientMesh {
|
||||
|
||||
};
|
||||
|
||||
// params for minimizing support area
|
||||
struct OrientParamsArea {
|
||||
float TAR_A = 0.015f;
|
||||
float TAR_B = 0.177f;
|
||||
float RELATIVE_F = 20;
|
||||
float CONTOUR_F = 0.5f;
|
||||
float BOTTOM_F = 2.5f;
|
||||
float BOTTOM_HULL_F = 0.1f;
|
||||
float TAR_C = 0.1f;
|
||||
float TAR_D = 1;
|
||||
float TAR_E = 0.0115f;
|
||||
float FIRST_LAY_H = 0.2f;//0.0475;
|
||||
float VECTOR_TOL = -0.00083f;
|
||||
float NEGL_FACE_SIZE = 0.01f;
|
||||
float ASCENT = -0.5f;
|
||||
float PLAFOND_ADV = 0.0599f;
|
||||
float CONTOUR_AMOUNT = 0.0182427f;
|
||||
float OV_H = 2.574f;
|
||||
float height_offset = 2.3728f;
|
||||
float height_log = 0.041375f;
|
||||
float height_log_k = 1.9325457f;
|
||||
float LAF_MAX = 0.999f; // cos(1.4\degree) for low angle face 0.9997f
|
||||
float LAF_MIN = 0.97f; // cos(14\degree) 0.9703f
|
||||
float TAR_LAF = 0.001f; //0.01f
|
||||
float TAR_PROJ_AREA = 0.1f;
|
||||
float BOTTOM_MIN = 0.1f; // min bottom area. If lower than it the object may be unstable
|
||||
float BOTTOM_MAX = 2000; // max bottom area. If get to it the object is stable enough (further increase bottom area won't do more help)
|
||||
float height_to_bottom_hull_ratio_MIN = 1;
|
||||
float BOTTOM_HULL_MAX = 2000;// max bottom hull area
|
||||
float APPERANCE_FACE_SUPP=3; // penalty of generating supports on appearance face
|
||||
|
||||
float overhang_angle = 60.f;
|
||||
bool use_low_angle_face = true;
|
||||
bool min_volume = false;
|
||||
Eigen::Vector3f fun_dir;
|
||||
|
||||
/// Allow parallel execution.
|
||||
bool parallel = true;
|
||||
|
||||
/// Progress indicator callback called when an object gets packed.
|
||||
/// The unsigned argument is the number of items remaining to pack.
|
||||
std::function<void(unsigned, std::string)> progressind = {};
|
||||
|
||||
/// A predicate returning true if abort is needed.
|
||||
std::function<bool(void)> stopcondition = {};
|
||||
|
||||
OrientParamsArea() = default;
|
||||
};
|
||||
|
||||
struct OrientParams {
|
||||
float TAR_A = 0.01f;//0.128f;
|
||||
float TAR_B = 0.177f;
|
||||
float RELATIVE_F= 6.610621027964314f;
|
||||
float CONTOUR_F = 0.23228623269775997f;
|
||||
float BOTTOM_F = 1.167152017941474f;
|
||||
float BOTTOM_HULL_F = 0.1f;
|
||||
float TAR_C = 0.24308070476924726f;
|
||||
float TAR_D = 0.6284515508160871f;
|
||||
float TAR_E = 0;//0.032157292647062234;
|
||||
float FIRST_LAY_H = 0.2f;//0.029;
|
||||
float VECTOR_TOL = -0.0011163303070972383f;
|
||||
float NEGL_FACE_SIZE = 0.1f;
|
||||
float ASCENT= -0.5f;
|
||||
float PLAFOND_ADV = 0.04079208948120519f;
|
||||
float CONTOUR_AMOUNT = 0.0101472219892684f;
|
||||
float OV_H = 1.0370178217794535f;
|
||||
float height_offset = 2.7417608343142073f;
|
||||
float height_log = 0.06442030687034085f;
|
||||
float height_log_k = 0.3933594673063997f;
|
||||
float LAF_MAX = 0.999f; // cos(1.4\degree) for low angle face //0.9997f;
|
||||
float LAF_MIN= 0.9703f; // cos(14\degree) 0.9703f;
|
||||
float TAR_LAF = 0.01f; //0.1f
|
||||
float TAR_PROJ_AREA = 0.1f;
|
||||
float BOTTOM_MIN = 0.1f; // min bottom area. If lower than it the objects may be unstable
|
||||
float BOTTOM_MAX = 2000; //400
|
||||
float height_to_bottom_hull_ratio_MIN = 1;
|
||||
float BOTTOM_HULL_MAX = 2000;// max bottom hull area to clip //600
|
||||
float APPERANCE_FACE_SUPP=3; // penalty of generating supports on appearance face
|
||||
|
||||
float overhang_angle = 60.f;
|
||||
bool use_low_angle_face = true;
|
||||
bool min_volume = false;
|
||||
Eigen::Vector3f fun_dir;
|
||||
float TAR_A { 0.01f }; // 0.128f;
|
||||
float TAR_B { 0.177f };
|
||||
float RELATIVE_F { 6.610621027964314f };
|
||||
float CONTOUR_F { 0.23228623269775997f };
|
||||
float BOTTOM_F { 1.167152017941474f };
|
||||
float BOTTOM_HULL_F { 0.1f };
|
||||
float TAR_C { 0.24308070476924726f };
|
||||
float TAR_D { 0.6284515508160871f };
|
||||
float TAR_E { 0}; // 0.032157292647062234;
|
||||
float FIRST_LAY_H { 0.2f}; // 0.029;
|
||||
float VECTOR_TOL { -0.0011163303070972383f };
|
||||
float NEGL_FACE_SIZE { 0.1f };
|
||||
float ASCENT { -0.5f };
|
||||
float PLAFOND_ADV { 0.04079208948120519f };
|
||||
float CONTOUR_AMOUNT { 0.0101472219892684f };
|
||||
float OV_H { 1.0370178217794535f };
|
||||
float height_offset { 2.7417608343142073f };
|
||||
float height_log { 0.06442030687034085f };
|
||||
float height_log_k { 0.3933594673063997f };
|
||||
float LAF_MAX { 0.999f }; // cos(1.4\degree) for low angle face //0.9997f;
|
||||
float LAF_MIN { 0.9703f }; // cos(14\degree) 0.9703f;
|
||||
float TAR_LAF { 0.01f }; // 0.1f
|
||||
float TAR_PROJ_AREA { 0.1f };
|
||||
float BOTTOM_MIN { 0.1f }; // min bottom area. If lower than it the objects may be unstable
|
||||
float BOTTOM_MAX { 2000 }; // 400
|
||||
float height_to_bottom_hull_ratio_MIN { 1 };
|
||||
float BOTTOM_HULL_MAX { 2000 }; // max bottom hull area to clip //600
|
||||
float APPERANCE_FACE_SUPP { 3 }; // penalty of generating supports on appearance face
|
||||
|
||||
float overhang_angle { 60.f };
|
||||
bool use_low_angle_face { true };
|
||||
bool min_volume { false };
|
||||
Eigen::Vector3f fun_dir {};
|
||||
|
||||
/// Allow parallel execution.
|
||||
bool parallel = false;
|
||||
bool parallel { false };
|
||||
|
||||
/// Progress indicator callback called when an object gets packed.
|
||||
/// The unsigned argument is the number of items remaining to pack.
|
||||
std::function<void(unsigned, std::string)> progressind = {};
|
||||
std::function<void(unsigned, std::string)> progressind {};
|
||||
|
||||
/// A predicate returning true if abort is needed.
|
||||
std::function<bool(void)> stopcondition = {};
|
||||
std::function<bool(void)> stopcondition {};
|
||||
|
||||
OrientParams() = default;
|
||||
};
|
||||
|
||||
@@ -56,12 +56,12 @@ public:
|
||||
int & i,
|
||||
Eigen::Matrix<double, 1, 3> &closest)
|
||||
{
|
||||
size_t idx_unsigned = 0;
|
||||
Vec3d closest_vec3d(closest);
|
||||
double dist =
|
||||
size_t idx_unsigned { 0 };
|
||||
Vec3d closest_vec3d { Vec3d::Zero() };
|
||||
const double dist {
|
||||
AABBTreeIndirect::squared_distance_to_indexed_triangle_set(
|
||||
its.vertices, its.indices, m_tree, point, idx_unsigned,
|
||||
closest_vec3d);
|
||||
closest_vec3d) };
|
||||
i = int(idx_unsigned);
|
||||
closest = closest_vec3d;
|
||||
return dist;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//**********************************************************/
|
||||
/* File: uiAmsHumidityPopup.cpp
|
||||
/**********************************************************
|
||||
* File: uiAmsHumidityPopup.cpp
|
||||
* Description: The popup with DevAms Humidity
|
||||
*
|
||||
* \n class uiAmsHumidityPopup
|
||||
//**********************************************************/
|
||||
**********************************************************/
|
||||
|
||||
#include "uiAmsHumidityPopup.h"
|
||||
|
||||
@@ -191,4 +191,4 @@ void uiAmsPercentHumidityDryPopup::msw_rescale()
|
||||
|
||||
} // namespace GUI
|
||||
|
||||
} // namespace Slic3r
|
||||
} // namespace Slic3r
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//**********************************************************/
|
||||
/* File: uiAmsHumidityPopup.h
|
||||
/**********************************************************
|
||||
* File: uiAmsHumidityPopup.h
|
||||
* Description: The popup with DevAms Humidity
|
||||
*
|
||||
* \n class uiAmsHumidityPopup
|
||||
//**********************************************************/
|
||||
**********************************************************/
|
||||
|
||||
#pragma once
|
||||
#include "slic3r/GUI/Widgets/AMSItem.hpp"
|
||||
@@ -68,7 +68,7 @@ private:
|
||||
|
||||
wxStaticBitmap* m_dry_state_img;
|
||||
Label* m_dry_state;
|
||||
|
||||
|
||||
Label* m_humidity_header;
|
||||
Label* m_humidity_label;
|
||||
|
||||
@@ -81,4 +81,4 @@ private:
|
||||
wxSizer* m_sizer;
|
||||
};
|
||||
|
||||
}} // namespace Slic3r::GUI
|
||||
}} // namespace Slic3r::GUI
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//**********************************************************/
|
||||
/* File: uiDeviceUpdateVersion.cpp
|
||||
/**********************************************************
|
||||
* File: uiDeviceUpdateVersion.cpp
|
||||
* Description: The panel with firmware info
|
||||
*
|
||||
* \n class uiDeviceUpdateVersion
|
||||
//**********************************************************/
|
||||
**********************************************************/
|
||||
|
||||
#include "uiDeviceUpdateVersion.h"
|
||||
|
||||
@@ -114,4 +114,4 @@ void uiDeviceUpdateVersion::CreateWidgets()
|
||||
Layout();
|
||||
|
||||
wxGetApp().UpdateDarkUIWin(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//**********************************************************/
|
||||
/* File: uiDeviceUpdateVersion.h
|
||||
/**********************************************************
|
||||
* File: uiDeviceUpdateVersion.h
|
||||
* Description: The panel with firmware info
|
||||
*
|
||||
* \n class uiDeviceUpdateVersion
|
||||
//**********************************************************/
|
||||
**********************************************************/
|
||||
|
||||
#pragma once
|
||||
#include <wx/panel.h>
|
||||
@@ -44,4 +44,4 @@ private:
|
||||
wxStaticText* m_dev_version;
|
||||
wxStaticBitmap* m_dev_upgrade_indicator;
|
||||
};
|
||||
};// end of namespace Slic3r::GUI
|
||||
};// end of namespace Slic3r::GUI
|
||||
|
||||
@@ -3213,7 +3213,7 @@ void ObjectList::merge(bool to_multipart_object)
|
||||
//changed_object(obj_idx);
|
||||
//remove();
|
||||
}
|
||||
/* wxGetApp().plater()->load_model_objects(objects);
|
||||
// wxGetApp().plater()->load_model_objects(objects);
|
||||
|
||||
Selection& selection = p->view3D->get_canvas3d()->get_selection();
|
||||
size_t last_obj_idx = p->model.objects.size() - 1;
|
||||
|
||||
@@ -1733,7 +1733,7 @@ std::string IMSlider::get_label(int tick, LabelType label_type)
|
||||
::sprintf(layer_height, "%.2f", m_values.empty() ? m_label_koef * value : m_values[value]);
|
||||
if (label_type == ltHeight) return std::string(layer_height);
|
||||
if (label_type == ltHeightWithLayer) {
|
||||
char buffer[64];
|
||||
char buffer[90];
|
||||
size_t layer_number;
|
||||
layer_number = m_draw_mode == dmSequentialFffPrint ? (m_values.empty() ? value : value + 1) : m_is_wipe_tower ? get_layer_number(value, label_type) + 1 : (m_values.empty() ? value : value + 1);
|
||||
::sprintf(buffer, "%5s\n%5s", std::to_string(layer_number).c_str(), layer_height);
|
||||
|
||||
@@ -149,6 +149,46 @@ void OrientJob::prepare()
|
||||
}
|
||||
}
|
||||
|
||||
/// parameters to minimize support area
|
||||
static void setMinimalSupportAreaPrams(Slic3r::orientation::OrientParams &out)
|
||||
{
|
||||
out.TAR_A = 0.015f;
|
||||
out.TAR_B = 0.177f;
|
||||
out.RELATIVE_F = 20;
|
||||
out.CONTOUR_F = 0.5f;
|
||||
out.BOTTOM_F = 2.5f;
|
||||
out.BOTTOM_HULL_F = 0.1f;
|
||||
out.TAR_C = 0.1f;
|
||||
out.TAR_D = 1;
|
||||
out.TAR_E = 0.0115f;
|
||||
out.FIRST_LAY_H = 0.2f; // 0.0475;
|
||||
out.VECTOR_TOL = -0.00083f;
|
||||
out.NEGL_FACE_SIZE = 0.01f;
|
||||
out.ASCENT = -0.5f;
|
||||
out.PLAFOND_ADV = 0.0599f;
|
||||
out.CONTOUR_AMOUNT = 0.0182427f;
|
||||
out.OV_H = 2.574f;
|
||||
out.height_offset = 2.3728f;
|
||||
out.height_log = 0.041375f;
|
||||
out.height_log_k = 1.9325457f;
|
||||
out.LAF_MAX = 0.999f; // cos(1.4\degree) for low angle face 0.9997f
|
||||
out.LAF_MIN = 0.97f; // cos(14\degree) 0.9703f
|
||||
out.TAR_LAF = 0.001f; // 0.01f
|
||||
out.TAR_PROJ_AREA = 0.1f;
|
||||
out.BOTTOM_MIN = 0.1f; // min bottom area. If lower than it the object may be unstable
|
||||
out.BOTTOM_MAX = 2000; // max bottom area. If get to it the object is stable enough (further increase bottom area won't do more help)
|
||||
out.height_to_bottom_hull_ratio_MIN = 1,
|
||||
out.BOTTOM_HULL_MAX = 2000; // max bottom hull area
|
||||
out.APPERANCE_FACE_SUPP = 3; // penalty of generating supports on appearance face
|
||||
out.overhang_angle = 60.f;
|
||||
out.use_low_angle_face = true;
|
||||
out.min_volume = false;
|
||||
out.fun_dir = {};
|
||||
out.parallel = true;
|
||||
out.progressind = {};
|
||||
out.stopcondition = {};
|
||||
}
|
||||
|
||||
void OrientJob::process(Ctl &ctl)
|
||||
{
|
||||
static const auto arrangestr = _u8L("Orienting...");
|
||||
@@ -161,9 +201,8 @@ void OrientJob::process(Ctl &ctl)
|
||||
const GLCanvas3D::OrientSettings& settings = m_plater->canvas3D()->get_orient_settings();
|
||||
|
||||
orientation::OrientParams params;
|
||||
orientation::OrientParamsArea params_area;
|
||||
if (settings.min_area) {
|
||||
memcpy(¶ms, ¶ms_area, sizeof(params));
|
||||
setMinimalSupportAreaPrams(params);
|
||||
params.min_volume = false;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -3629,7 +3629,7 @@ void SelectMachineDialog::on_send_print()
|
||||
BOOST_LOG_TRIVIAL(error) << "build_nozzle_info errors";
|
||||
}
|
||||
|
||||
m_print_job->sdcard_state = obj_->GetStorage()->get_sdcard_state();
|
||||
m_print_job->sdcard_state = obj_->GetStorage()->get_sdcard_state();
|
||||
m_print_job->has_sdcard = wxGetApp().app_config->get("allow_abnormal_storage") == "true"
|
||||
? (m_print_job->sdcard_state == DevStorage::SdcardState::HAS_SDCARD_NORMAL
|
||||
|| m_print_job->sdcard_state == DevStorage::SdcardState::HAS_SDCARD_ABNORMAL)
|
||||
@@ -3868,12 +3868,11 @@ _compare_obj_names(MachineObject* obj1, MachineObject* obj2)
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*@note _collect_machine_list
|
||||
*@param dev_manager -- the device manager
|
||||
*@param sorted_machine_objs -- return the sorted machine objects
|
||||
*@param best_one -- return the best one
|
||||
*/
|
||||
/*******************************************************************/
|
||||
* @note _collect_machine_list
|
||||
* @param dev_manager -- the device manager
|
||||
* @param sorted_machine_objs -- return the sorted machine objects
|
||||
* @param best_one -- return the best one
|
||||
*******************************************************************/
|
||||
static void
|
||||
_collect_sorted_machines(Slic3r::DeviceManager* dev_manager,
|
||||
std::vector<MachineObject*>& sorted_machine_objs)
|
||||
|
||||
@@ -107,7 +107,7 @@ std::optional<RaycastManager::Hit> RaycastManager::first_hit(const Vec3d& point,
|
||||
const AABBMesh *hit_mesh = nullptr;
|
||||
double hit_squared_distance = 0.;
|
||||
int hit_face = -1;
|
||||
Vec3d hit_world;
|
||||
Vec3d hit_world { Vec3d::Zero() };
|
||||
const Transform3d *hit_tramsformation = nullptr;
|
||||
const TrKey *hit_key = nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user