Merge branch 'master' of https://github.com/prusa3d/Slic3r into et_canvas_gui_refactoring
Before ![]() (image error) Size: 144 KiB |
Before ![]() (image error) Size: 364 KiB |
Before ![]() (image error) Size: 398 KiB |
Before ![]() (image error) Size: 794 KiB |
Before ![]() (image error) Size: 63 KiB |
Before ![]() (image error) Size: 159 KiB |
Before ![]() (image error) Size: 143 KiB |
Before ![]() (image error) Size: 361 KiB |
Before ![]() (image error) Size: 396 KiB |
Before ![]() (image error) Size: 790 KiB |
Before ![]() (image error) Size: 63 KiB |
Before ![]() (image error) Size: 159 KiB |
Before ![]() (image error) Size: 105 KiB |
Before ![]() (image error) Size: 277 KiB |
Before ![]() (image error) Size: 324 KiB |
Before ![]() (image error) Size: 674 KiB |
Before ![]() (image error) Size: 29 KiB |
Before ![]() (image error) Size: 20 KiB |
|
@ -556,29 +556,7 @@ ShapeData2D projectModelFromTop(const Slic3r::Model &model) {
|
||||||
// TODO export the exact 2D projection. Cannot do it as libnest2d
|
// TODO export the exact 2D projection. Cannot do it as libnest2d
|
||||||
// does not support concave shapes (yet).
|
// does not support concave shapes (yet).
|
||||||
ClipperLib::Path clpath;
|
ClipperLib::Path clpath;
|
||||||
//WIP Vojtech's optimization of the calculation of the convex hull is not working correctly yet.
|
|
||||||
#if 1
|
|
||||||
{
|
|
||||||
TriangleMesh rmesh = objptr->raw_mesh();
|
|
||||||
|
|
||||||
ModelInstance * finst = objptr->instances.front();
|
|
||||||
|
|
||||||
// Object instances should carry the same scaling and
|
|
||||||
// x, y rotation that is why we use the first instance.
|
|
||||||
// The next line will apply only the full mirroring and scaling
|
|
||||||
rmesh.transform(finst->get_matrix(true, true, false, false));
|
|
||||||
rmesh.rotate_x(float(finst->get_rotation()(X)));
|
|
||||||
rmesh.rotate_y(float(finst->get_rotation()(Y)));
|
|
||||||
|
|
||||||
// TODO export the exact 2D projection. Cannot do it as libnest2d
|
|
||||||
// does not support concave shapes (yet).
|
|
||||||
auto p = rmesh.convex_hull();
|
|
||||||
|
|
||||||
p.make_clockwise();
|
|
||||||
p.append(p.first_point());
|
|
||||||
clpath = Slic3rMultiPoint_to_ClipperPath(p);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
// Object instances should carry the same scaling and
|
// Object instances should carry the same scaling and
|
||||||
// x, y rotation that is why we use the first instance.
|
// x, y rotation that is why we use the first instance.
|
||||||
{
|
{
|
||||||
|
@ -593,7 +571,6 @@ ShapeData2D projectModelFromTop(const Slic3r::Model &model) {
|
||||||
p.append(p.first_point());
|
p.append(p.first_point());
|
||||||
clpath = Slic3rMultiPoint_to_ClipperPath(p);
|
clpath = Slic3rMultiPoint_to_ClipperPath(p);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
for(ModelInstance* objinst : objptr->instances) {
|
for(ModelInstance* objinst : objptr->instances) {
|
||||||
if(objinst) {
|
if(objinst) {
|
||||||
|
|