mirror of
https://git.mirrors.martin98.com/https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-03 08:05:13 +08:00
Fix: Circular bed shape (without 3D model) not rendering in correct position (#9333)
* Update 3DBed.cpp * Update 3DBed.cpp --------- Co-authored-by: Noisyfox <timemanager.rick@gmail.com>
This commit is contained in:
parent
e2e06e5e89
commit
0e2582e0bb
@ -648,9 +648,11 @@ void Bed3D::update_bed_triangles()
|
|||||||
(*model_offset_ptr)(1) = m_build_volume.bounding_volume2d().min.y() - bed_ext.min.y();
|
(*model_offset_ptr)(1) = m_build_volume.bounding_volume2d().min.y() - bed_ext.min.y();
|
||||||
(*model_offset_ptr)(2) = -0.41 + GROUND_Z;
|
(*model_offset_ptr)(2) = -0.41 + GROUND_Z;
|
||||||
|
|
||||||
|
// ORCA fix for circular bed (without 3D model) beds rendered with shifted position
|
||||||
|
Vec2d point_shift = m_build_volume.type() == BuildVolume_Type::Circle ? Vec2d(0,0) : m_bed_shape[0];
|
||||||
std::vector<Vec2d> origin_bed_shape;
|
std::vector<Vec2d> origin_bed_shape;
|
||||||
for (size_t i = 0; i < m_bed_shape.size(); i++) {
|
for (size_t i = 0; i < m_bed_shape.size(); i++) {
|
||||||
origin_bed_shape.push_back(m_bed_shape[i] - m_bed_shape[0]);
|
origin_bed_shape.push_back(m_bed_shape[i] - point_shift);
|
||||||
}
|
}
|
||||||
std::vector<Vec2d> new_bed_shape; // offset to correct origin
|
std::vector<Vec2d> new_bed_shape; // offset to correct origin
|
||||||
for (auto point : origin_bed_shape) {
|
for (auto point : origin_bed_shape) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user