FIX: fix new_bed_shape's calculation process
Jira: STUDIO-5122 Change-Id: I5f3e6a301a297123af28692c90bef6759f425b06
This commit is contained in:
parent
3fd1c6702a
commit
dc8852c8e9
|
@ -636,8 +636,12 @@ GeometryBuffer Bed3D::update_bed_triangles() const
|
|||
(*model_offset_ptr)(1) = m_build_volume.bounding_volume2d().min.y();
|
||||
(*model_offset_ptr)(2) = -0.41 + GROUND_Z;
|
||||
|
||||
std::vector<Vec2d> new_bed_shape;
|
||||
for (auto point: m_bed_shape) {
|
||||
std::vector<Vec2d> origin_bed_shape;
|
||||
for (size_t i = 0; i < m_bed_shape.size(); i++) {
|
||||
origin_bed_shape.push_back(m_bed_shape[i] - m_bed_shape[0]);
|
||||
}
|
||||
std::vector<Vec2d> new_bed_shape; // offset to correct origin
|
||||
for (auto point : origin_bed_shape) {
|
||||
Vec2d new_point(point.x() + model_offset_ptr->x(), point.y() + model_offset_ptr->y());
|
||||
new_bed_shape.push_back(new_point);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue