mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-25 01:31:14 -06:00
Merge branch 'master' of https://github.com/Prusa3d/PrusaSlicer
This commit is contained in:
commit
5a638f10cc
7 changed files with 74 additions and 5 deletions
|
|
@ -123,6 +123,9 @@ void AppConfig::set_defaults()
|
|||
|
||||
if (get("default_action_on_select_preset").empty())
|
||||
set("default_action_on_select_preset", "none"); // , "transfer", "discard" or "save"
|
||||
|
||||
if (get("color_mapinulation_panel").empty())
|
||||
set("color_mapinulation_panel", "0");
|
||||
}
|
||||
#if ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -472,6 +472,29 @@ void Model::convert_from_imperial_units(bool only_small_volumes)
|
|||
}
|
||||
}
|
||||
|
||||
bool Model::looks_like_saved_in_meters() const
|
||||
{
|
||||
if (this->objects.size() == 0)
|
||||
return false;
|
||||
|
||||
for (ModelObject* obj : this->objects)
|
||||
if (obj->get_object_stl_stats().volume < 0.001) // 0.001 = 0.1*0.1*0.1;
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void Model::convert_from_meters(bool only_small_volumes)
|
||||
{
|
||||
double m_to_mm = 1000;
|
||||
for (ModelObject* obj : this->objects)
|
||||
if (! only_small_volumes || obj->get_object_stl_stats().volume < 0.001) { // 0.001 = 0.1*0.1*0.1;
|
||||
obj->scale_mesh_after_creation(Vec3d(m_to_mm, m_to_mm, m_to_mm));
|
||||
for (ModelVolume* v : obj->volumes)
|
||||
v->source.is_converted_from_inches = true;
|
||||
}
|
||||
}
|
||||
|
||||
void Model::adjust_min_z()
|
||||
{
|
||||
if (objects.empty())
|
||||
|
|
|
|||
|
|
@ -1019,6 +1019,8 @@ public:
|
|||
void convert_multipart_object(unsigned int max_extruders);
|
||||
bool looks_like_imperial_units() const;
|
||||
void convert_from_imperial_units(bool only_small_volumes);
|
||||
bool looks_like_saved_in_meters() const;
|
||||
void convert_from_meters(bool only_small_volumes);
|
||||
|
||||
// Ensures that the min z of the model is not negative
|
||||
void adjust_min_z();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue