mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
FIX: Text dragging of special file doesn't work
Jira: 4271 Change-Id: I0b2e33ac0cf4919bea93732151529deac3b7e9ed (cherry picked from commit f1534363d63c5f8b8ddb00edb8edef6b0376b54d)
This commit is contained in:
parent
b0e20ad68e
commit
f78b067525
1 changed files with 6 additions and 2 deletions
|
@ -1003,7 +1003,8 @@ bool GLGizmoText::update_text_positions(const std::vector<std::string>& texts)
|
|||
Vec3d temp_normal = m_mouse_normal_world;
|
||||
|
||||
Vec3d cut_plane = Vec3d::UnitY();
|
||||
if (temp_normal != Vec3d::UnitZ()) {
|
||||
double epson = 1e-6;
|
||||
if (!(abs(temp_normal.x()) <= epson && abs(temp_normal.y()) <= epson && abs(temp_normal.z()) > epson)) { // temp_normal != Vec3d::UnitZ()
|
||||
Vec3d v_plane = temp_normal.cross(Vec3d::UnitZ());
|
||||
cut_plane = v_plane.cross(temp_normal);
|
||||
}
|
||||
|
@ -1092,6 +1093,9 @@ bool GLGizmoText::update_text_positions(const std::vector<std::string>& texts)
|
|||
|
||||
MeshSlicingParams slicing_params;
|
||||
slicing_params.trafo = transfo * mi->get_transformation().get_matrix() /** volume->get_transformation().get_matrix()*/;
|
||||
// for debug
|
||||
// its_write_obj(slice_meshs.its, "D:/debug_files/mesh.obj");
|
||||
|
||||
// generate polygons
|
||||
const Polygons temp_polys = slice_mesh(slice_meshs.its, click_point.z(), slicing_params);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue