FIX: rotate model before cut, the rotation of connectors is incorrect

github issue #1646 & #1647

Change-Id: Iab1d6984685a532011f425e704ccae039a6ef65d
(cherry picked from commit 1219045039de4ac0ed677b264e6e8469e6bc72dd)
This commit is contained in:
zhimin.zeng 2023-04-21 11:02:36 +08:00 committed by lane.wei
parent 6c0d1898b3
commit ae0a470f4c

View file

@ -1846,7 +1846,7 @@ void ModelObject::process_connector_cut(
// Perform cut // Perform cut
TriangleMesh upper_mesh, lower_mesh; TriangleMesh upper_mesh, lower_mesh;
process_volume_cut(volume, instance_matrix, cut_matrix, attributes, upper_mesh, lower_mesh); process_volume_cut(volume, Transform3d::Identity(), cut_matrix, attributes, upper_mesh, lower_mesh);
// add small Z offset to better preview // add small Z offset to better preview
upper_mesh.translate((-0.05 * Vec3d::UnitZ()).cast<float>()); upper_mesh.translate((-0.05 * Vec3d::UnitZ()).cast<float>());