mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-01 04:41:59 +08:00
Drop to bed function now accounts for instance transformation
This commit is contained in:
parent
3d8c3804fa
commit
0481f33ceb
@ -348,7 +348,8 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
|
|||||||
if (selection.is_single_volume() || selection.is_single_modifier()) {
|
if (selection.is_single_volume() || selection.is_single_modifier()) {
|
||||||
const GLVolume* volume = selection.get_volume(*selection.get_volume_idxs().begin());
|
const GLVolume* volume = selection.get_volume(*selection.get_volume_idxs().begin());
|
||||||
|
|
||||||
Vec3d diff = m_cache.position - Vec3d(0., 0., get_volume_min_z(volume));
|
const Geometry::Transformation& instance_trafo = volume->get_instance_transformation();
|
||||||
|
Vec3d diff = m_cache.position - instance_trafo.get_matrix(true).inverse() * Vec3d(0., 0., get_volume_min_z(volume));
|
||||||
|
|
||||||
change_position_value(0, diff.x());
|
change_position_value(0, diff.x());
|
||||||
change_position_value(1, diff.y());
|
change_position_value(1, diff.y());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user