mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
FIX: false alarms due to wrong print z of gcode paths
The print z was wrong previously when there is a wipe tower, or there is an object with floating parts. Jira: STUDIO-2719 udesk: https://bblcs.s5.udesk.cn/entry/ticket/show/2258732 Change-Id: Ifa070aeb548d692549cf88df0d405ecdf0160c80 (cherry picked from commit be3097d8044ce9e0079ebf7070b15c7aad7aff0e)
This commit is contained in:
@@ -490,7 +490,7 @@ class GCodeViewer
|
||||
std::vector<Endpoints>& get_endpoints() { return m_endpoints; }
|
||||
double get_z_at(unsigned int id) const { return (id < m_zs.size()) ? m_zs[id] : 0.0; }
|
||||
Endpoints get_endpoints_at(unsigned int id) const { return (id < m_endpoints.size()) ? m_endpoints[id] : Endpoints(); }
|
||||
int get_l_at(double z) const
|
||||
int get_l_at(float z) const
|
||||
{
|
||||
auto iter = std::upper_bound(m_zs.begin(), m_zs.end(), z);
|
||||
return std::distance(m_zs.begin(), iter);
|
||||
|
||||
Reference in New Issue
Block a user