mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 00:36:25 +08:00
Merge branch 'master' of https://github.com/Prusa3d/Slic3r
This commit is contained in:
commit
7730f273fb
@ -1585,15 +1585,17 @@ void GLGizmoFlatten::update_planes()
|
|||||||
m_planes.pop_back();
|
m_planes.pop_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Let's prepare transformation of the normal vector from mesh to instance coordinates.
|
||||||
|
Geometry::Transformation t(inst_matrix);
|
||||||
|
Vec3d scaling = t.get_scaling_factor();
|
||||||
|
t.set_scaling_factor(Vec3d(1./scaling(0), 1./scaling(1), 1./scaling(2)));
|
||||||
|
|
||||||
// Now we'll go through all the polygons, transform the points into xy plane to process them:
|
// Now we'll go through all the polygons, transform the points into xy plane to process them:
|
||||||
for (unsigned int polygon_id=0; polygon_id < m_planes.size(); ++polygon_id) {
|
for (unsigned int polygon_id=0; polygon_id < m_planes.size(); ++polygon_id) {
|
||||||
Pointf3s& polygon = m_planes[polygon_id].vertices;
|
Pointf3s& polygon = m_planes[polygon_id].vertices;
|
||||||
const Vec3d& normal = m_planes[polygon_id].normal;
|
const Vec3d& normal = m_planes[polygon_id].normal;
|
||||||
|
|
||||||
// let's transform the normal accodring to the instance matrix:
|
// transform the normal according to the instance matrix:
|
||||||
Geometry::Transformation t(inst_matrix);
|
|
||||||
Vec3d scaling = t.get_scaling_factor();
|
|
||||||
t.set_scaling_factor(Vec3d(1./(scaling(0)*scaling(0)), 1./(scaling(0)*scaling(0)), 1./(scaling(0)*scaling(0))));
|
|
||||||
Vec3d normal_transformed = t.get_matrix() * normal;
|
Vec3d normal_transformed = t.get_matrix() * normal;
|
||||||
|
|
||||||
// We are going to rotate about z and y to flatten the plane
|
// We are going to rotate about z and y to flatten the plane
|
||||||
|
@ -194,6 +194,8 @@ bool GUI_App::OnInit()
|
|||||||
preset_updater->slic3r_update_notify();
|
preset_updater->slic3r_update_notify();
|
||||||
}
|
}
|
||||||
preset_updater->sync(preset_bundle);
|
preset_updater->sync(preset_bundle);
|
||||||
|
|
||||||
|
load_current_presets();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@ -155,7 +155,6 @@ void MainFrame::create_preset_tabs()
|
|||||||
add_created_tab(new TabSLAPrint(m_tabpanel));
|
add_created_tab(new TabSLAPrint(m_tabpanel));
|
||||||
add_created_tab(new TabSLAMaterial(m_tabpanel));
|
add_created_tab(new TabSLAMaterial(m_tabpanel));
|
||||||
add_created_tab(new TabPrinter(m_tabpanel));
|
add_created_tab(new TabPrinter(m_tabpanel));
|
||||||
GUI::wxGetApp().load_current_presets();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainFrame::add_created_tab(Tab* panel)
|
void MainFrame::add_created_tab(Tab* panel)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user