mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-09-28 17:03:12 +08:00
FIX: Difference in autoorientation between GUI and CLI
jira: STUDIO-10894 github: #6121,#6092 Change-Id: I0afb3043cdc60d22edd1ac6139fb64e794d61366
This commit is contained in:
parent
09c9493fc4
commit
3ed6c0a7b2
@ -4419,6 +4419,10 @@ int CLI::run(int argc, char **argv)
|
||||
if (orients_requirement[o->id().id])
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << "Before process command, Orient object, name=" << o->name <<",id="<<o->id().id<<std::endl;
|
||||
if (!load_process_config.empty())
|
||||
{
|
||||
o->config.assign_config(load_process_config);
|
||||
}
|
||||
orientation::orient(o);
|
||||
oriented_or_arranged = true;
|
||||
}
|
||||
|
@ -519,6 +519,11 @@ void orient(ModelObject* obj)
|
||||
{
|
||||
auto m = obj->mesh();
|
||||
AutoOrienter orienter(&m);
|
||||
if (obj->config.has("support_threshold_angle"))
|
||||
{
|
||||
orienter.params.overhang_angle = obj->config.opt_int("support_threshold_angle");
|
||||
orienter.params.ASCENT = cos(PI - orienter.params.overhang_angle * PI / 180);
|
||||
}
|
||||
Vec3d orientation = orienter.process();
|
||||
Vec3d axis;
|
||||
double angle;
|
||||
|
@ -102,7 +102,7 @@ struct OrientParams {
|
||||
float FIRST_LAY_H = 0.2f;//0.029;
|
||||
float VECTOR_TOL = -0.0011163303070972383f;
|
||||
float NEGL_FACE_SIZE = 0.1f;
|
||||
float ASCENT= -0.5f;
|
||||
float ASCENT= -0.86602540378f;
|
||||
float PLAFOND_ADV = 0.04079208948120519f;
|
||||
float CONTOUR_AMOUNT = 0.0101472219892684f;
|
||||
float OV_H = 1.0370178217794535f;
|
||||
@ -119,7 +119,7 @@ struct OrientParams {
|
||||
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;
|
||||
float overhang_angle = 30.f;
|
||||
bool use_low_angle_face = true;
|
||||
bool min_volume = false;
|
||||
Eigen::Vector3f fun_dir;
|
||||
|
Loading…
x
Reference in New Issue
Block a user