mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 13:47:59 -06:00
Merge branch 'master' of https://github.com/prusa3d/Slic3r
This commit is contained in:
commit
054a3258d3
4 changed files with 12 additions and 11 deletions
|
@ -108,6 +108,9 @@ stl_fix_normal_directions(stl_file *stl) {
|
||||||
|
|
||||||
if (stl->error) return;
|
if (stl->error) return;
|
||||||
|
|
||||||
|
// this may happen for malformed models, see: https://github.com/prusa3d/Slic3r/issues/2209
|
||||||
|
if (stl->stats.number_of_facets == 0) return;
|
||||||
|
|
||||||
/* Initialize linked list. */
|
/* Initialize linked list. */
|
||||||
head = (struct stl_normal*)malloc(sizeof(struct stl_normal));
|
head = (struct stl_normal*)malloc(sizeof(struct stl_normal));
|
||||||
if(head == NULL) perror("stl_fix_normal_directions");
|
if(head == NULL) perror("stl_fix_normal_directions");
|
||||||
|
|
|
@ -567,6 +567,11 @@ ShapeData2D projectModelFromTop(const Slic3r::Model &model) {
|
||||||
Transform3d trafo_instance = Geometry::assemble_transform(Vec3d::Zero(), rotation, finst->get_scaling_factor(), finst->get_mirror());
|
Transform3d trafo_instance = Geometry::assemble_transform(Vec3d::Zero(), rotation, finst->get_scaling_factor(), finst->get_mirror());
|
||||||
Polygon p = objptr->convex_hull_2d(trafo_instance);
|
Polygon p = objptr->convex_hull_2d(trafo_instance);
|
||||||
assert(! p.points.empty());
|
assert(! p.points.empty());
|
||||||
|
|
||||||
|
// this may happen for malformed models, see: https://github.com/prusa3d/Slic3r/issues/2209
|
||||||
|
if (p.points.empty())
|
||||||
|
continue;
|
||||||
|
|
||||||
p.reverse();
|
p.reverse();
|
||||||
assert(!p.is_counter_clockwise());
|
assert(!p.is_counter_clockwise());
|
||||||
p.append(p.first_point());
|
p.append(p.first_point());
|
||||||
|
|
|
@ -79,6 +79,8 @@ void GLGizmoSlaSupports::set_sla_support_data(ModelObject* model_object, const S
|
||||||
m_parent.toggle_model_objects_visibility(false);
|
m_parent.toggle_model_objects_visibility(false);
|
||||||
m_parent.toggle_model_objects_visibility(true, m_model_object, m_active_instance);
|
m_parent.toggle_model_objects_visibility(true, m_model_object, m_active_instance);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
m_parent.toggle_model_objects_visibility(true, nullptr, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,11 +57,6 @@ wxMenuItem* append_menu_item(wxMenu* menu, int id, const wxString& string, const
|
||||||
auto *item = new wxMenuItem(menu, id, string, description);
|
auto *item = new wxMenuItem(menu, id, string, description);
|
||||||
if (icon.IsOk()) {
|
if (icon.IsOk()) {
|
||||||
item->SetBitmap(icon);
|
item->SetBitmap(icon);
|
||||||
#ifndef __WXMSW__
|
|
||||||
wxImage imgGrey = icon.ConvertToImage().ConvertToGreyscale();
|
|
||||||
if (imgGrey.IsOk())
|
|
||||||
item->SetDisabledBitmap(wxBitmap(imgGrey));
|
|
||||||
#endif /* __WXMSW__ */
|
|
||||||
}
|
}
|
||||||
menu->Append(item);
|
menu->Append(item);
|
||||||
|
|
||||||
|
@ -100,10 +95,6 @@ wxMenuItem* append_submenu(wxMenu* menu, wxMenu* sub_menu, int id, const wxStrin
|
||||||
item->SetBitmap(create_scaled_bitmap(nullptr, icon)); // FIXME: pass window ptr
|
item->SetBitmap(create_scaled_bitmap(nullptr, icon)); // FIXME: pass window ptr
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
msw_menuitem_bitmaps[id] = icon;
|
msw_menuitem_bitmaps[id] = icon;
|
||||||
#else /* __WXMSW__ */
|
|
||||||
wxImage imgGrey = icon.ConvertToImage().ConvertToGreyscale();
|
|
||||||
if (imgGrey.IsOk())
|
|
||||||
item->SetDisabledBitmap(wxBitmap(imgGrey));
|
|
||||||
#endif /* __WXMSW__ */
|
#endif /* __WXMSW__ */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue