Fix of Some FDM supports fail to generate due to wrongly-translated enforcer polygons. #6739

Thanks @n8bot for finding the bug.
Also removed some dead code in MM segmentation.
This commit is contained in:
Vojtech Bubnik 2021-08-10 09:41:28 +02:00
parent 9f9cbb46f9
commit 04d6b17c57
4 changed files with 8 additions and 227 deletions

View file

@ -428,10 +428,8 @@ std::pair<FillAdaptive::OctreePtr, FillAdaptive::OctreePtr> PrintObject::prepare
indexed_triangle_set mesh = this->model_object()->raw_indexed_triangle_set();
// Rotate mesh and build octree on it with axis-aligned (standart base) cubes.
Transform3d m = m_trafo;
m.pretranslate(Vec3d(- unscale<float>(m_center_offset.x()), - unscale<float>(m_center_offset.y()), 0));
auto to_octree = transform_to_octree().toRotationMatrix();
its_transform(mesh, to_octree * m, true);
its_transform(mesh, to_octree * this->trafo_centered(), true);
// Triangulate internal bridging surfaces.
std::vector<std::vector<Vec3d>> overhangs(this->layers().size());
@ -2298,7 +2296,7 @@ void PrintObject::project_and_append_custom_facets(
: mv->supported_facets.get_facets_strict(*mv, type);
if (! custom_facets.indices.empty())
project_triangles_to_slabs(this->layers(), custom_facets,
(Eigen::Translation3d(to_3d(unscaled<double>(this->center_offset()), 0.)) * this->trafo() * mv->get_matrix()).cast<float>(),
(this->trafo_centered() * mv->get_matrix()).cast<float>(),
seam, out);
}
}