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;
|
||||
|
||||
// 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. */
|
||||
head = (struct stl_normal*)malloc(sizeof(struct stl_normal));
|
||||
if(head == NULL) perror("stl_fix_normal_directions");
|
||||
|
|
|
@ -567,8 +567,13 @@ ShapeData2D projectModelFromTop(const Slic3r::Model &model) {
|
|||
Transform3d trafo_instance = Geometry::assemble_transform(Vec3d::Zero(), rotation, finst->get_scaling_factor(), finst->get_mirror());
|
||||
Polygon p = objptr->convex_hull_2d(trafo_instance);
|
||||
assert(! p.points.empty());
|
||||
p.reverse();
|
||||
assert(! p.is_counter_clockwise());
|
||||
|
||||
// this may happen for malformed models, see: https://github.com/prusa3d/Slic3r/issues/2209
|
||||
if (p.points.empty())
|
||||
continue;
|
||||
|
||||
p.reverse();
|
||||
assert(!p.is_counter_clockwise());
|
||||
p.append(p.first_point());
|
||||
clpath = Slic3rMultiPoint_to_ClipperPath(p);
|
||||
}
|
||||
|
|
|
@ -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(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);
|
||||
if (icon.IsOk()) {
|
||||
item->SetBitmap(icon);
|
||||
#ifndef __WXMSW__
|
||||
wxImage imgGrey = icon.ConvertToImage().ConvertToGreyscale();
|
||||
if (imgGrey.IsOk())
|
||||
item->SetDisabledBitmap(wxBitmap(imgGrey));
|
||||
#endif /* __WXMSW__ */
|
||||
}
|
||||
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
|
||||
#ifdef __WXMSW__
|
||||
msw_menuitem_bitmaps[id] = icon;
|
||||
#else /* __WXMSW__ */
|
||||
wxImage imgGrey = icon.ConvertToImage().ConvertToGreyscale();
|
||||
if (imgGrey.IsOk())
|
||||
item->SetDisabledBitmap(wxBitmap(imgGrey));
|
||||
#endif /* __WXMSW__ */
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue