Skip to content

Commit

Permalink
Do not use get_scaling_factor then construct the matrix again, becaus…
Browse files Browse the repository at this point in the history
…e it cannot properly handle situations that contains negative scale (mirror) / shear (SoftFever#5578, SoftFever#4719)
  • Loading branch information
Noisyfox committed Jun 23, 2024
1 parent d9f52ec commit 232b0ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libslic3r/Model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3213,10 +3213,10 @@ void ModelInstance::get_arrange_polygon(void *ap, const Slic3r::DynamicPrintConf

Vec3d rotation = get_rotation();
rotation.z() = 0.;
Transform3d trafo_instance =
Geometry::assemble_transform(get_offset().z() * Vec3d::UnitZ(), rotation, get_scaling_factor(), get_mirror());

Polygon p = get_object()->convex_hull_2d(trafo_instance);
Geometry::Transformation t(m_transformation);
t.set_offset(get_offset().z() * Vec3d::UnitZ());
t.set_rotation(rotation);
Polygon p = get_object()->convex_hull_2d(t.get_matrix());

// if (!p.points.empty()) {
// Polygons pp{p};
Expand Down

0 comments on commit 232b0ec

Please sign in to comment.